Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltDBIndexClient ¶
type BoltDBIndexClient interface {
QueryWithCursor(_ context.Context, c *bbolt.Cursor, query chunk.IndexQuery, callback chunk.QueryPagesCallback) error
}
type IndexSet ¶
type IndexSet interface { Init() error Close() MultiQueries(ctx context.Context, queries []chunk.IndexQuery, callback chunk.QueryPagesCallback) error DropAllDBs() error Err() error LastUsedAt() time.Time UpdateLastUsedAt() Sync(ctx context.Context) (err error) AwaitReady(ctx context.Context) error }
func NewIndexSet ¶
type Limits ¶
type Limits interface { AllByUserID() map[string]*validation.Limits DefaultLimits() *validation.Limits }
type Table ¶
type Table interface { Close() MultiQueries(ctx context.Context, queries []chunk.IndexQuery, callback chunk.QueryPagesCallback) error DropUnusedIndex(ttl time.Duration, now time.Time) (bool, error) Sync(ctx context.Context) error EnsureQueryReadiness(ctx context.Context, userIDs []string) error }
func LoadTable ¶
func LoadTable(name, cacheLocation string, storageClient storage.Client, 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. It is used for loading and initializing table at startup. It would initialize index sets which already had files locally.
func NewTable ¶
func NewTable(name, cacheLocation string, storageClient storage.Client, boltDBIndexClient BoltDBIndexClient, metrics *metrics) Table
NewTable just creates an instance of table without trying to load files from local storage or object store. It is used for initializing table at query time.
type TableManager ¶
type TableManager struct {
// contains filtered or unexported fields
}
func NewTableManager ¶
func NewTableManager(cfg Config, boltIndexClient BoltDBIndexClient, indexStorageClient storage.Client, registerer prometheus.Registerer) (*TableManager, error)
func (*TableManager) QueryPages ¶
func (tm *TableManager) QueryPages(ctx context.Context, queries []chunk.IndexQuery, callback chunk.QueryPagesCallback) error
func (*TableManager) Stop ¶
func (tm *TableManager) Stop()
Click to show internal directories.
Click to hide internal directories.