# Functions
NewStore creates a new tsdb index ReaderWriter.
Return the index as well as the underlying raw file reader which isn't exposed as an index method but is helpful for building an io.reader for the index shipper.
Overlap checks whether the given chunk or index bounds overlap with the bounds of a query range.
PostingsForMatchers assembles a single postings iterator against the index reader based on the given matchers.
# Constants
TenantLabel is part of the reserved label namespace (__ prefix) It's used to create multi-tenant TSDBs (which do not have a tenancy concept) These labels are stripped out during compaction to single-tenant TSDBs.
By prefixing records with versions, we can easily update our wal schema.
FirstWrite is a special record type written once at the beginning of every WAL.
By prefixing records with versions, we can easily update our wal schema.
# Structs
Builder is a helper used to create tsdb indices.
implements stores.Index.
TODO(owen-d).
MultiTenantIndex will inject a tenant label to it's queries This works with pre-compacted TSDBs which aren't yet per tenant.
Identifier has all the information needed to resolve a TSDB index Notably this abstracts away OS path separators, etc.
nolint TSDBFile is backed by an actual file and implements the indexshipper/index.Index interface.
nolint TSDBIndex is backed by an IndexReader and translates the IndexReader to an Index implementation It loads the file into memory and doesn't keep a file descriptor open.
# Interfaces
TODO(chaudum): Replace with new v1.Interval struct.
Identifier can resolve an index to a name (in object storage) and a path (on disk).
IndexReader provides reading access of serialized index data.
nolint:revive TSDBManager wraps the index shipper and writes/manages TSDB files on disk.
# Type aliases
GetRawFileReaderFunc returns an io.ReadSeeker for reading raw tsdb file from disk.
Index adapter for a function which returns an index when queried.