Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexGatewayOwnsTenant ¶
IndexGatewayOwnsTenant is invoked by an IndexGateway instance and answers whether if the given tenant is assigned to this instance or not.
It is only relevant by an IndexGateway in the ring mode and if it returns false for a given tenant, that tenant will be ignored by this IndexGateway during query readiness.
type IndexSet ¶
type Limits ¶
type Limits interface { AllByUserID() map[string]*validation.Limits DefaultLimits() *validation.Limits }
type Table ¶
type Table interface { Close() ForEach(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 }
func NewTableManager ¶
func NewTableManager(cfg Config, openIndexFileFunc index.OpenIndexFileFunc, indexStorageClient storage.Client, ownsTenantFn IndexGatewayOwnsTenant, tableRangesToHandle config.TableRanges, reg prometheus.Registerer) (TableManager, error)