Documentation
¶
Index ¶
- Constants
- func AddEngineTypeToContext(ctx context.Context, r *http.Request) context.Context
- type Engine
- func (qf *Engine) MakeInstantQueryFromPlan(ctx context.Context, q storage.Queryable, opts promql.QueryOpts, ...) (promql.Query, error)
- func (qf *Engine) MakeRangeQueryFromPlan(ctx context.Context, q storage.Queryable, opts promql.QueryOpts, ...) (promql.Query, error)
- func (qf *Engine) NewInstantQuery(ctx context.Context, q storage.Queryable, opts promql.QueryOpts, qs string, ...) (promql.Query, error)
- func (qf *Engine) NewRangeQuery(ctx context.Context, q storage.Queryable, opts promql.QueryOpts, qs string, ...) (promql.Query, error)
- type QueryEngine
- type ThanosEngineConfig
- type Type
Constants ¶
View Source
const TypeHeader = "X-PromQL-EngineType"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts promql.EngineOpts, thanosEngineCfg ThanosEngineConfig, reg prometheus.Registerer) *Engine
func (*Engine) MakeInstantQueryFromPlan ¶
func (*Engine) MakeRangeQueryFromPlan ¶
func (*Engine) NewInstantQuery ¶
type QueryEngine ¶
type QueryEngine interface {
promql.QueryEngine
MakeInstantQueryFromPlan(ctx context.Context, q storage.Queryable, opts promql.QueryOpts, root logicalplan.Node, ts time.Time, qs string) (promql.Query, error)
MakeRangeQueryFromPlan(ctx context.Context, q storage.Queryable, opts promql.QueryOpts, root logicalplan.Node, start time.Time, end time.Time, interval time.Duration, qs string) (promql.Query, error)
}
type ThanosEngineConfig ¶
type ThanosEngineConfig struct {
Enabled bool `yaml:"enabled"`
EnableXFunctions bool `yaml:"enable_x_functions"`
Optimizers string `yaml:"optimizers"`
LogicalOptimizers []logicalplan.Optimizer `yaml:"-"`
}
ThanosEngineConfig contains the configuration to create engine
func (*ThanosEngineConfig) RegisterFlagsWithPrefix ¶
func (cfg *ThanosEngineConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
func (*ThanosEngineConfig) Validate ¶
func (cfg *ThanosEngineConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.