Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMergeQueryable ¶ added in v1.10.0
func NewMergeQueryable(idLabelName string, callback MergeQuerierCallback, byPassWithSingleQuerier bool) storage.Queryable
NewMergeQueryable returns a queryable that merges results from multiple underlying Queryables. The underlying queryables and its label values to be considered are returned by a MergeQuerierCallback. By setting byPassWithSingleQuerier to true the mergeQuerier gets by-passed and results for request with a single querier will not contain the id label. This allows a smoother transition, when enabling tenant federation in a cluster. Results contain a label `idLabelName` to identify the underlying queryable that it originally resulted from. If the label `idLabelName` is already existing, its value is overwritten and the previous value is exposed through a new label prefixed with "original_". This behaviour is not implemented recursively.
func NewQueryable ¶
NewQueryable returns a queryable that iterates through all the tenant IDs that are part of the request and aggregates the results from each tenant's Querier by sending of subsequent requests. By setting byPassWithSingleQuerier to true the mergeQuerier gets by-passed and results for request with a single querier will not contain the "__tenant_id__" label. This allows a smoother transition, when enabling tenant federation in a cluster. The result contains a label "__tenant_id__" to identify the tenant ID that it originally resulted from. If the label "__tenant_id__" is already existing, its value is overwritten by the tenant ID and the previous value is exposed through a new label prefixed with "original_". This behaviour is not implemented recursively.
Types ¶
type Config ¶
type Config struct { // Enabled switches on support for multi tenant query federation Enabled bool `yaml:"enabled"` }