Versions in this module Expand all Collapse all v0 v0.1.0 Aug 14, 2023 v0.0.9 Aug 11, 2023 v0.0.8 Feb 2, 2023 v0.0.7 Feb 1, 2023 v0.0.6 Oct 24, 2022 Changes in this version + const DefaultLookbackDelta v0.0.5 Oct 20, 2022 v0.0.4 Aug 19, 2022 v0.0.3 May 10, 2022 v0.0.2 May 10, 2022 v0.0.1 May 9, 2022 Changes in this version + const LowestPrec + const ValueTypeMatrix + const ValueTypeNone + const ValueTypeScalar + const ValueTypeString + const ValueTypeVector + var LookbackDelta = 5 * time.Minute + func Inspect(node Node, f inspector) + func ParseMetric(input string) (m labels.Labels, err error) + func ParseMetricSelector(input string) (m []*labels.Matcher, err error) + func Tree(node Node) string + func Walk(v Visitor, node Node, path []Node) error + type AggregateExpr struct + Expr Expr + Grouping []string + Op ItemType + Param Expr + Without bool + func (e *AggregateExpr) Type() ValueType + func (node *AggregateExpr) String() string + type AlertStmt struct + Annotations labels.Labels + Duration time.Duration + Expr Expr + Labels labels.Labels + Name string + func (node *AlertStmt) String() string + type BinaryExpr struct + LHS Expr + Op ItemType + RHS Expr + ReturnBool bool + VectorMatching *VectorMatching + func (e *BinaryExpr) Type() ValueType + func (node *BinaryExpr) String() string + type Call struct + Args Expressions + Func *Function + func (e *Call) Type() ValueType + func (node *Call) String() string + type Engine struct + func NewEngine(opts EngineOpts) *Engine + func (ng *Engine) NewInstantQuery(q storage.Queryable, qs string, ts time.Time) (Query, error) + func (ng *Engine) NewRangeQuery(q storage.Queryable, qs string, start, end time.Time, interval time.Duration) (Query, error) + type EngineOpts struct + Logger log.Logger + MaxConcurrent int + MaxSamples int + Reg prometheus.Registerer + Timeout time.Duration + type ErrQueryCanceled string + func (e ErrQueryCanceled) Error() string + type ErrQueryTimeout string + func (e ErrQueryTimeout) Error() string + type ErrStorage error + type ErrTooManySamples string + func (e ErrTooManySamples) Error() string + type EvalNodeHelper struct + type EvalStmt struct + End time.Time + Expr Expr + Interval time.Duration + Start time.Time + func (node *EvalStmt) String() string + type Expr interface + Type func() ValueType + func ParseExpr(input string) (Expr, error) + type Expressions []Expr + func (es Expressions) String() (s string) + type Function struct + ArgTypes []ValueType + Call func(vals []Value, args Expressions, enh *EvalNodeHelper) Vector + Name string + ReturnType ValueType + Variadic int + type ItemType int + func (i ItemType) String() string + type Matrix []Series + func (Matrix) Type() ValueType + func (m Matrix) ContainsSameLabelset() bool + func (m Matrix) Len() int + func (m Matrix) Less(i, j int) bool + func (m Matrix) String() string + func (m Matrix) Swap(i, j int) + func (m Matrix) TotalSamples() int + type MatrixSelector struct + LabelMatchers []*labels.Matcher + Name string + Offset time.Duration + Range time.Duration + func (e *MatrixSelector) Type() ValueType + func (node *MatrixSelector) String() string + type Node interface + String func() string + type NumberLiteral struct + Val float64 + func (e *NumberLiteral) Type() ValueType + func (node *NumberLiteral) String() string + type ParenExpr struct + Expr Expr + func (e *ParenExpr) Type() ValueType + func (node *ParenExpr) String() string + type ParseErr struct + Err error + Line int + Pos int + func (e *ParseErr) Error() string + type Point struct + T int64 + V float64 + func (p Point) MarshalJSON() ([]byte, error) + func (p Point) String() string + type Pos int + type Query interface + Cancel func() + Close func() + Exec func(ctx context.Context) *Result + Statement func() Statement + Stats func() *stats.QueryTimers + type RecordStmt struct + Expr Expr + Labels labels.Labels + Name string + func (node *RecordStmt) String() string + type Result struct + Err error + Value Value + func (r *Result) Matrix() (Matrix, error) + func (r *Result) Scalar() (Scalar, error) + func (r *Result) String() string + func (r *Result) Vector() (Vector, error) + type Sample struct + Metric labels.Labels + func (s Sample) MarshalJSON() ([]byte, error) + func (s Sample) String() string + type Scalar struct + T int64 + V float64 + func (Scalar) Type() ValueType + func (s Scalar) MarshalJSON() ([]byte, error) + func (s Scalar) String() string + type Series struct + Metric labels.Labels + Points []Point + func (s Series) String() string + type Statement interface + type Statements []Statement + func ParseStmts(input string) (Statements, error) + func (stmts Statements) String() (s string) + type String struct + T int64 + V string + func (String) Type() ValueType + func (s String) MarshalJSON() ([]byte, error) + func (s String) String() string + type StringLiteral struct + Val string + func (e *StringLiteral) Type() ValueType + func (node *StringLiteral) String() string + type UnaryExpr struct + Expr Expr + Op ItemType + func (e *UnaryExpr) Type() ValueType + func (node *UnaryExpr) String() string + type Value interface + String func() string + Type func() ValueType + type ValueType string + type Vector []Sample + func (Vector) Type() ValueType + func (vec Vector) ContainsSameLabelset() bool + func (vec Vector) String() string + type VectorMatchCardinality int + const CardManyToMany + const CardManyToOne + const CardOneToMany + const CardOneToOne + func (vmc VectorMatchCardinality) String() string + type VectorMatching struct + Card VectorMatchCardinality + Include []string + MatchingLabels []string + On bool + type VectorSelector struct + LabelMatchers []*labels.Matcher + Name string + Offset time.Duration + func (e *VectorSelector) Type() ValueType + func (node *VectorSelector) String() string + type Visitor interface + Visit func(node Node, path []Node) (w Visitor, err error)