Versions in this module Expand all Collapse all v1 v1.7.2 Feb 15, 2018 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 func(Node, []Node) bool) + 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) + 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(logger log.Logger, reg prometheus.Registerer, maxConcurrent int, ...) *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 ErrQueryCanceled string + func (e ErrQueryCanceled) Error() string + type ErrQueryTimeout string + func (e ErrQueryTimeout) Error() string + type ErrStorage error + 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(ev *evaluator, args Expressions) Value + Name string + ReturnType ValueType + Variadic int + type Matrix []Series + func (Matrix) Type() ValueType + 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) + 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() + Exec func(ctx context.Context) *Result + Statement func() Statement + Stats func() *stats.TimerGroup + 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 Test struct + func NewTest(t testutil.T, input string) (*Test, error) + func (t *Test) Close() + func (t *Test) Context() context.Context + func (t *Test) QueryEngine() *Engine + func (t *Test) Queryable() storage.Queryable + func (t *Test) Run() error + func (t *Test) Storage() storage.Storage + 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) 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)