Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexSet ¶
type IndexSet interface { Init(forQuerying bool) error Close() ForEach(ctx context.Context, callback index.ForEachIndexCallback) error ForEachConcurrent(ctx context.Context, callback index.ForEachIndexCallback) error DropAllDBs() error Err() error LastUsedAt() time.Time UpdateLastUsedAt() Sync(ctx context.Context) (err error) AwaitReady(ctx context.Context, reason string) error }
type Limits ¶
type Limits interface { AllByUserID() map[string]*validation.Limits DefaultLimits() *validation.Limits VolumeMaxSeries(userID string) int }
type Table ¶
type Table interface { Close() ForEach(ctx context.Context, userID string, callback index.ForEachIndexCallback) error ForEachConcurrent(ctx context.Context, userID string, callback index.ForEachIndexCallback) 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, openIndexFileFunc index.OpenIndexFileFunc, 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, openIndexFileFunc index.OpenIndexFileFunc, 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 interface { Stop() ForEach(ctx context.Context, tableName, userID string, callback index.ForEachIndexCallback) error ForEachConcurrent(ctx context.Context, tableName, userID string, callback index.ForEachIndexCallback) error }
func NewTableManager ¶
func NewTableManager(cfg Config, openIndexFileFunc index.OpenIndexFileFunc, indexStorageClient storage.Client, tenantFilter TenantFilter, tableRangeToHandle config.TableRange, reg prometheus.Registerer, logger log.Logger) (TableManager, error)
type TenantFilter ¶
TenantFilter is invoked by an IndexGateway instance and answers which tenants from the given list of tenants are assigned to this instance.
It is only relevant by an IndexGateway in the ring mode and if its result does not contain a given tenant, that tenant will be ignored by this IndexGateway during query readiness.
It requires the same function signature as indexgateway.(*ShardingStrategy).FilterTenants