github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/storage/stores/indexshipper/index/index.go (about) 1 package index 2 3 import "io" 4 5 type Index interface { 6 Name() string 7 Path() string 8 Close() error 9 Reader() (io.ReadSeeker, error) 10 } 11 12 // OpenIndexFileFunc opens an index file stored at the given path. 13 // There is a possibility of files being corrupted due to abrupt shutdown so 14 // the implementation should take care of gracefully handling failures in opening corrupted files. 15 type OpenIndexFileFunc func(string) (Index, error) 16 type ForEachIndexCallback func(isMultiTenantIndex bool, idx Index) error