Documentation ¶
Index ¶
- type BoltDBIndexClient
- type Config
- type StorageClient
- type Table
- func (t *Table) CleanupAllDBs() error
- func (t *Table) Close()
- func (t *Table) Err() error
- func (t *Table) LastUsedAt() time.Time
- func (t *Table) MultiQueries(ctx context.Context, queries []chunk.IndexQuery, callback chunk_util.Callback) error
- func (t *Table) Sync(ctx context.Context) error
- func (t *Table) UpdateLastUsedAt()
- type TableManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltDBIndexClient ¶
type StorageClient ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table is a collection of multiple files created for a same table by various ingesters. All the public methods are concurrency safe and take care of mutexes to avoid any data race.
func LoadTable ¶
func LoadTable(ctx context.Context, name, cacheLocation string, storageClient StorageClient, boltDBIndexClient BoltDBIndexClient, metrics *metrics) (*Table, error)
LoadTable loads a table from local storage(syncs the table too if we have it locally) or downloads it from the shared store.
func NewTable ¶
func NewTable(spanCtx context.Context, name, cacheLocation string, storageClient StorageClient, boltDBIndexClient BoltDBIndexClient, metrics *metrics) *Table
func (*Table) CleanupAllDBs ¶
Closes reference to all the open dbs and removes the local file.
func (*Table) LastUsedAt ¶
LastUsedAt returns the time at which table was last used for querying.
func (*Table) MultiQueries ¶
func (t *Table) MultiQueries(ctx context.Context, queries []chunk.IndexQuery, callback chunk_util.Callback) error
MultiQueries runs multiple queries without having to take lock multiple times for each query.
func (*Table) Sync ¶
Sync downloads updated and new files from the storage relevant for the table and removes the deleted ones
func (*Table) UpdateLastUsedAt ¶
func (t *Table) UpdateLastUsedAt()
type TableManager ¶
type TableManager struct {
// contains filtered or unexported fields
}
func NewTableManager ¶
func NewTableManager(cfg Config, boltIndexClient BoltDBIndexClient, indexStorageClient StorageClient, registerer prometheus.Registerer) (*TableManager, error)
func (*TableManager) QueryPages ¶
func (tm *TableManager) QueryPages(ctx context.Context, queries []chunk.IndexQuery, callback chunk_util.Callback) error
func (*TableManager) Stop ¶
func (tm *TableManager) Stop()