Documentation
¶
Index ¶
- type AggregateGroupBy
- type AggregateK
- type AggregateRangeUnwrapInput
- type BaseQueryRequest
- type CollectionRequest
- type ColumnOrder
- type KeyValue
- type LabelExpression
- type LabelExpressionBuilder
- type LabelExpressionField
- type NativeQueryExecutor
- type NativeQueryRequest
- type QuantileOverTimeInput
- type QueryCollectionExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateGroupBy ¶
AggregateGroupBy represents the aggregate group by object
func (*AggregateGroupBy) FromValue ¶
func (agb *AggregateGroupBy) FromValue(input map[string]any) error
FromValue decodes property values from an input object
func (AggregateGroupBy) String ¶
func (agb AggregateGroupBy) String() string
String implement the fmt.Stringer interface
type AggregateK ¶
type AggregateK struct { AggregateGroupBy K int64 }
AggregateK represents the object argument of topK and bottomK object
type AggregateRangeUnwrapInput ¶
type AggregateRangeUnwrapInput struct { Range time.Duration Unwrap string ConversionFunction *metadata.ConversionFunction }
AggregateRangeUnwrapInput represents an aggregate range with unwrap input argument
func (*AggregateRangeUnwrapInput) FromValue ¶
func (aru *AggregateRangeUnwrapInput) FromValue(input map[string]any, unitTimeUnit metadata.UnixTimeUnit) error
FromValue decodes property values from an input object
func (AggregateRangeUnwrapInput) String ¶
func (aru AggregateRangeUnwrapInput) String() string
String implement the fmt.Stringer interface
type BaseQueryRequest ¶
type BaseQueryRequest struct { Timestamp *time.Time Start *time.Time End *time.Time Since *scalar.Duration Interval *scalar.Duration Step *scalar.Duration Flat *bool OrderBy []ColumnOrder Variables map[string]any // contains filtered or unexported fields }
BaseQueryRequest represents the common query request structure
func (BaseQueryRequest) FindTimestampOrderBy ¶
func (bqr BaseQueryRequest) FindTimestampOrderBy() *ColumnOrder
FindTimestampOrderBy checks and returns the first timestamp order by item if exist
func (BaseQueryRequest) GetFlat ¶
func (bqr BaseQueryRequest) GetFlat() bool
GetFlat gets the flat boolean value
func (BaseQueryRequest) GetQueryDirection ¶
func (bqr BaseQueryRequest) GetQueryDirection() *client.QueryDirection
GetQueryDirection gets the query direction if exist
type CollectionRequest ¶
type CollectionRequest struct { *BaseQueryRequest LogLine *schema.ExpressionBinaryComparisonOperator MetricValue *schema.ExpressionBinaryComparisonOperator LabelExpressions map[string]LabelExpression FieldExpression schema.ExpressionEncoder Aggregations []KeyValue }
CollectionRequest the structured predicate result which is evaluated from the raw expression
func EvalCollectionRequest ¶
func EvalCollectionRequest(request *schema.QueryRequest, model metadata.ModelInfo, arguments map[string]any, variables map[string]any, runtime *metadata.RuntimeSettings) (*CollectionRequest, error)
EvalCollectionRequest evaluates the requested collection data of the query request
type ColumnOrder ¶
ColumnOrder the structured sorting columns
type LabelExpression ¶
type LabelExpression struct { Name string Expressions []schema.ExpressionBinaryComparisonOperator }
LabelExpression the structured data of a label expression
type LabelExpressionBuilder ¶
type LabelExpressionBuilder struct { LabelExpression Labels map[string]metadata.ModelLabelInfo // contains filtered or unexported fields }
type LabelExpressionField ¶
LabelExpressionField the structured data of a label field expression
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 ¶
type NativeQueryRequest struct { *BaseQueryRequest Expression schema.Expression HasValueBoolExp bool }
NativeQueryRequest the structured native request which is evaluated from the raw expression
func EvalNativeQueryRequest ¶
func EvalNativeQueryRequest(request *schema.QueryRequest, arguments map[string]any, variables map[string]any, runtime *metadata.RuntimeSettings) (*NativeQueryRequest, error)
EvalNativeQueryRequest evaluates the requested collection data of the query request
type QuantileOverTimeInput ¶
type QuantileOverTimeInput struct { AggregateRangeUnwrapInput Quantile float64 }
QuantileOverTimeInput represents an input argument for the QuantileOverTime aggregation
func (*QuantileOverTimeInput) FromValue ¶
func (qot *QuantileOverTimeInput) FromValue(input map[string]any, unitTimeUnit metadata.UnixTimeUnit) error
FromValue decodes property values from an input object
type QueryCollectionExecutor ¶
type QueryCollectionExecutor struct { Client *client.Client Tracer trace.Tracer Runtime *metadata.RuntimeSettings Request *schema.QueryRequest Model metadata.ModelInfo QueryType metadata.QueryType Variables map[string]any Arguments map[string]any }
QueryCollectionExecutor evaluates and executes the query request.
func (*QueryCollectionExecutor) Explain ¶
func (qce *QueryCollectionExecutor) Explain(ctx context.Context) (*CollectionRequest, string, bool, error)
Explain explains the query request