Versions in this module Expand all Collapse all v0 v0.26.0 Apr 9, 2022 Changes in this version + const BinaryFormatV1 + const MagicIndex + var NotFoundRangeErr = errors.New("range not found") + func WriteBinary(ctx context.Context, bkt objstore.BucketReader, id ulid.ULID, filename string) (err error) + type BinaryReader struct + func NewBinaryReader(ctx context.Context, logger log.Logger, bkt objstore.BucketReader, dir string, ...) (*BinaryReader, error) + func (r *BinaryReader) Close() error + func (r *BinaryReader) IndexVersion() (int, error) + func (r *BinaryReader) LabelNames() ([]string, error) + func (r *BinaryReader) LabelValues(name string) ([]string, error) + func (r *BinaryReader) LookupSymbol(o uint32) (string, error) + func (r *BinaryReader) PostingsOffset(name, value string) (index.Range, error) + type BinaryTOC struct + PostingsOffsetTable uint64 + Symbols uint64 + type FileWriter struct + func NewFileWriter(name string, size int) (*FileWriter, error) + func (fw *FileWriter) AddPadding(size int) error + func (fw *FileWriter) Close() error + func (fw *FileWriter) Flush() error + func (fw *FileWriter) Pos() uint64 + func (fw *FileWriter) Remove() error + func (fw *FileWriter) Write(bufs ...[]byte) error + func (fw *FileWriter) WriteAt(buf []byte, pos uint64) error + type LazyBinaryReader struct + func NewLazyBinaryReader(ctx context.Context, logger log.Logger, bkt objstore.BucketReader, dir string, ...) (*LazyBinaryReader, error) + func (r *LazyBinaryReader) Close() error + func (r *LazyBinaryReader) IndexVersion() (int, error) + func (r *LazyBinaryReader) LabelNames() ([]string, error) + func (r *LazyBinaryReader) LabelValues(name string) ([]string, error) + func (r *LazyBinaryReader) LookupSymbol(o uint32) (string, error) + func (r *LazyBinaryReader) PostingsOffset(name, value string) (index.Range, error) + type LazyBinaryReaderMetrics struct + func NewLazyBinaryReaderMetrics(reg prometheus.Registerer) *LazyBinaryReaderMetrics + type Reader interface + IndexVersion func() (int, error) + LabelNames func() ([]string, error) + LabelValues func(name string) ([]string, error) + LookupSymbol func(o uint32) (string, error) + PostingsOffset func(name string, value string) (index.Range, error) + type ReaderPool struct + func NewReaderPool(logger log.Logger, lazyReaderEnabled bool, lazyReaderIdleTimeout time.Duration, ...) *ReaderPool + func (p *ReaderPool) Close() + func (p *ReaderPool) NewBinaryReader(ctx context.Context, logger log.Logger, bkt objstore.BucketReader, dir string, ...) (Reader, error) + type ReaderPoolMetrics struct + func NewReaderPoolMetrics(reg prometheus.Registerer) *ReaderPoolMetrics