Documentation ¶
Index ¶
- type CollectionRequest
- type ColumnOrder
- type HoltWintersInput
- type KeyValue
- type LabelExpression
- type LabelExpressionBuilder
- type LabelExpressionField
- type LabelJoinInput
- type LabelReplaceInput
- type NativeQueryExecutor
- type NativeQueryRequest
- type PredictLinearInput
- type QuantileOverTimeInput
- type QueryCollectionExecutor
- type RawQueryExecutor
- type ValueBoundaryInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionRequest ¶
type CollectionRequest struct { Timestamp schema.ComparisonValue Start schema.ComparisonValue End schema.ComparisonValue OrderBy []ColumnOrder Value *schema.ExpressionBinaryComparisonOperator LabelExpressions map[string]*LabelExpression Functions []KeyValue }
CollectionRequest the structured predicate result which is evaluated from the raw expression
func EvalCollectionRequest ¶
func EvalCollectionRequest(request *schema.QueryRequest, arguments map[string]any) (*CollectionRequest, error)
EvalCollectionRequest evaluates the requested collection data of the query request
type ColumnOrder ¶
ColumnOrder the structured sorting columns
type HoltWintersInput ¶
type HoltWintersInput struct { Sf float64 Tf float64 Range client.RangeResolution }
HoltWintersInput represents input arguments of the holt_winters function
func (*HoltWintersInput) FromValue ¶
func (hwi *HoltWintersInput) FromValue(value any, unixTimeUnit client.UnixTimeUnit) error
FromValue decodes data from any value
type LabelExpression ¶
type LabelExpression struct { Name string Expressions []schema.ExpressionBinaryComparisonOperator }
LabelExpression the structured data of a label expression
type LabelExpressionBuilder ¶
type LabelExpressionBuilder struct { LabelExpression // contains filtered or unexported fields }
type LabelExpressionField ¶
LabelExpressionField the structured data of a label field expression
type LabelJoinInput ¶
type LabelJoinInput struct { DestLabel string `mapstructure:"dest_label"` Separator string `mapstructure:"separator"` SourceLabels []string `mapstructure:"source_labels"` }
LabelJoinInput represents input arguments for the replace_label function
func (LabelJoinInput) String ¶
func (lji LabelJoinInput) String() string
String implements the fmt.Stringer interface
type LabelReplaceInput ¶
type LabelReplaceInput struct { DestLabel string `mapstructure:"dest_label"` Replacement string `mapstructure:"replacement"` SourceLabel string `mapstructure:"source_label"` Regex string `mapstructure:"regex"` }
LabelReplaceInput represents input arguments for the replace_label function
func (LabelReplaceInput) String ¶
func (lri LabelReplaceInput) String() string
String implements the fmt.Stringer interface
type NativeQueryExecutor ¶
type NativeQueryExecutor struct { Client *client.Client Tracer trace.Tracer Runtime *metadata.RuntimeSettings Request *schema.QueryRequest NativeQuery *metadata.NativeQuery Arguments map[string]any Variables map[string]any }
func (*NativeQueryExecutor) Explain ¶
func (nqe *NativeQueryExecutor) Explain(ctx context.Context) (*NativeQueryRequest, string, error)
Explain explains the query request
type NativeQueryRequest ¶ added in v0.3.0
type NativeQueryRequest struct { Timestamp any Start any End any Timeout any Step any OrderBy []ColumnOrder Variables map[string]any Expression schema.Expression HasValueBoolExp bool }
NativeQueryRequest the structured native request which is evaluated from the raw expression
func EvalNativeQueryRequest ¶ added in v0.3.0
func EvalNativeQueryRequest(request *schema.QueryRequest, arguments map[string]any, variables map[string]any) (*NativeQueryRequest, error)
EvalNativeQueryRequest evaluates the requested collection data of the query request
type PredictLinearInput ¶
type PredictLinearInput struct { T float64 Range client.RangeResolution }
PredictLinearInput represents input arguments of the predict_linear function
func (*PredictLinearInput) FromValue ¶
func (pli *PredictLinearInput) FromValue(value any, unixTimeUnit client.UnixTimeUnit) error
FromValue decodes data from any value
type QuantileOverTimeInput ¶
type QuantileOverTimeInput struct { Quantile float64 Range client.RangeResolution }
QuantileOverTimeInput represents input arguments of the quantile_over_time function
func (*QuantileOverTimeInput) FromValue ¶
func (qoti *QuantileOverTimeInput) FromValue(value any, unixTimeUnit client.UnixTimeUnit) error
FromValue decodes data from any value
type QueryCollectionExecutor ¶
type QueryCollectionExecutor struct { Client *client.Client Tracer trace.Tracer Runtime *metadata.RuntimeSettings Request *schema.QueryRequest Metric metadata.MetricInfo Variables map[string]any Arguments map[string]any }
func (*QueryCollectionExecutor) Explain ¶
func (qce *QueryCollectionExecutor) Explain(ctx context.Context) (*CollectionRequest, string, bool, error)
Explain explains the query request
type RawQueryExecutor ¶ added in v0.3.0
type RawQueryExecutor struct { Client *client.Client Tracer trace.Tracer Runtime *metadata.RuntimeSettings Request *schema.QueryRequest Arguments map[string]any // contains filtered or unexported fields }
type ValueBoundaryInput ¶
type ValueBoundaryInput struct { Min float64 `mapstructure:"min"` Max float64 `mapstructure:"max"` }
ValueBoundaryInput represents the lower and upper input arguments