Versions in this module Expand all Collapse all v2 v2.13.1 Oct 8, 2023 Changes in this version + const LowestPrec + const ValueTypeMatrix + const ValueTypeNone + const ValueTypeScalar + const ValueTypeString + const ValueTypeVector + var DefaultEvaluationInterval int64 + var LookbackDelta = 5 * time.Minute + func GetDefaultEvaluationInterval() int64 + 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 SetDefaultEvaluationInterval(ev time.Duration) + func Tree(node Node) string + func Walk(v Visitor, node Node, path []Node) error + type ActiveQueryTracker struct + func NewActiveQueryTracker(localStoragePath string, maxQueries int, logger log.Logger) *ActiveQueryTracker + func (tracker ActiveQueryTracker) Delete(insertIndex int) + func (tracker ActiveQueryTracker) Insert(query string) int + type AggregateExpr struct + Expr Expr + Grouping []string + Op ItemType + Param Expr + Without bool + func (e *AggregateExpr) Type() ValueType + func (node *AggregateExpr) 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 + ActiveQueryTracker *ActiveQueryTracker + Logger log.Logger + MaxConcurrent int + MaxSamples int + Reg prometheus.Registerer + Timeout time.Duration + type Entry struct + Query string + Timestamp int64 + type ErrQueryCanceled string + func (e ErrQueryCanceled) Error() string + type ErrQueryTimeout string + func (e ErrQueryTimeout) Error() string + type ErrStorage struct + Err error + func (e ErrStorage) Error() string + 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 + const ItemADD + const ItemAssign + const ItemAvg + const ItemBlank + const ItemBool + const ItemBottomK + const ItemBy + const ItemColon + const ItemComma + const ItemComment + const ItemCount + const ItemCountValues + const ItemDIV + const ItemDuration + const ItemEOF + const ItemEQL + const ItemEQLRegex + const ItemError + const ItemGTE + const ItemGTR + const ItemGroupLeft + const ItemGroupRight + const ItemIdentifier + const ItemIgnoring + const ItemLAND + const ItemLOR + const ItemLSS + const ItemLTE + const ItemLUnless + const ItemLeftBrace + const ItemLeftBracket + const ItemLeftParen + const ItemMOD + const ItemMUL + const ItemMax + const ItemMetricIdentifier + const ItemMin + const ItemNEQ + const ItemNEQRegex + const ItemNumber + const ItemOffset + const ItemOn + const ItemPOW + const ItemQuantile + const ItemRightBrace + const ItemRightBracket + const ItemRightParen + const ItemSUB + const ItemSemicolon + const ItemSpace + const ItemStddev + const ItemStdvar + const ItemString + const ItemSum + const ItemTimes + const ItemTopK + const ItemWithout + func (i ItemType) String() string + type LazyLoader struct + func NewLazyLoader(t testutil.T, input string) (*LazyLoader, error) + func (ll *LazyLoader) Close() + func (ll *LazyLoader) Context() context.Context + func (ll *LazyLoader) QueryEngine() *Engine + func (ll *LazyLoader) Queryable() storage.Queryable + func (ll *LazyLoader) Storage() storage.Storage + func (ll *LazyLoader) WithSamplesTill(ts time.Time, fn func(error)) + 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 Result struct + Err error + Value Value + Warnings storage.Warnings + 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 StorageSeries struct + func NewStorageSeries(series Series) *StorageSeries + func (ss *StorageSeries) Iterator() storage.SeriesIterator + func (ss *StorageSeries) Labels() labels.Labels + 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 SubqueryExpr struct + Expr Expr + Offset time.Duration + Range time.Duration + Step time.Duration + func (e *SubqueryExpr) Type() ValueType + func (node *SubqueryExpr) 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) 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) Other modules containing this package github.com/zpascal/prometheus