expression

package
v0.0.0-...-20f4fa7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationExpression

type AnnotationExpression struct {
	Expression function.Expression
	Annotation string
}

func (*AnnotationExpression) Evaluate

Evaluate evalutes the underlying expression without memoization, since its child expression should handle memoization itself.

func (*AnnotationExpression) ExpressionDescription

func (expr *AnnotationExpression) ExpressionDescription(mode function.DescriptionMode) string

func (*AnnotationExpression) Literal

func (expr *AnnotationExpression) Literal() interface{}

type Duration

type Duration struct {
	Source   string
	Duration time.Duration
}

func (Duration) ActualEvaluate

func (expr Duration) ActualEvaluate(context function.EvaluationContext) (function.Value, error)

func (Duration) ExpressionDescription

func (expr Duration) ExpressionDescription(mode function.DescriptionMode) string

func (Duration) Literal

func (expr Duration) Literal() interface{}

type FunctionExpression

type FunctionExpression struct {
	FunctionName     string
	Arguments        []function.Expression
	GroupBy          []string
	GroupByCollapses bool
}

func (*FunctionExpression) ActualEvaluate

func (expr *FunctionExpression) ActualEvaluate(context function.EvaluationContext) (function.Value, error)

func (*FunctionExpression) ExpressionDescription

func (expr *FunctionExpression) ExpressionDescription(mode function.DescriptionMode) string

type MetricFetchExpression

type MetricFetchExpression struct {
	MetricName string
	Predicate  predicate.Predicate
}

func (*MetricFetchExpression) ActualEvaluate

func (expr *MetricFetchExpression) ActualEvaluate(context function.EvaluationContext) (function.Value, error)

func (*MetricFetchExpression) ExpressionDescription

func (expr *MetricFetchExpression) ExpressionDescription(mode function.DescriptionMode) string

type Scalar

type Scalar struct {
	Value float64
}

func (Scalar) ActualEvaluate

func (expr Scalar) ActualEvaluate(context function.EvaluationContext) (function.Value, error)

func (Scalar) ExpressionDescription

func (expr Scalar) ExpressionDescription(mode function.DescriptionMode) string

func (Scalar) Literal

func (expr Scalar) Literal() interface{}

type String

type String struct {
	Value string
}

func (String) ActualEvaluate

func (expr String) ActualEvaluate(context function.EvaluationContext) (function.Value, error)

func (String) ExpressionDescription

func (expr String) ExpressionDescription(mode function.DescriptionMode) string

func (String) Literal

func (expr String) Literal() interface{}

type SyntaxError

type SyntaxError struct {
	// contains filtered or unexported fields
}

SyntaxError is raised when the user query is invalid. This can happen for two reasons: * The query does not generate a valid AST. * Invalid input is provided

func (SyntaxError) Error

func (err SyntaxError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL