promql

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 17 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelMatchersToModelMatcher added in v0.5.0

func LabelMatchersToModelMatcher(
	lMatchers []*labels.Matcher,
	tagOpts models.TagOptions,
) (models.Matchers, error)

LabelMatchersToModelMatcher parses promql matchers to model matchers

func NewAggregationOperator added in v0.4.2

func NewAggregationOperator(expr *promql.AggregateExpr) (parser.Params, error)

NewAggregationOperator creates a new aggregation operator based on the type

func NewBinaryOperator

func NewBinaryOperator(expr *promql.BinaryExpr, lhs, rhs parser.NodeID) (parser.Params, error)

NewBinaryOperator creates a new binary operator based on the type

func NewFunctionExpr

func NewFunctionExpr(
	name string,
	argValues []interface{},
	stringValues []string,
) (parser.Params, bool, error)

NewFunctionExpr creates a new function expr based on the type

func NewScalarOperator added in v0.4.1

func NewScalarOperator(expr *promql.NumberLiteral) (parser.Params, error)

NewScalarOperator creates a new scalar operator

func NewSelectorFromMatrix

func NewSelectorFromMatrix(
	n *promql.MatrixSelector,
	tagOpts models.TagOptions,
) (parser.Params, error)

NewSelectorFromMatrix creates a new fetchop

func NewSelectorFromVector

func NewSelectorFromVector(
	n *promql.VectorSelector,
	tagOpts models.TagOptions,
) (parser.Params, error)

NewSelectorFromVector creates a new fetchop

func Parse

func Parse(q string, tagOpts models.TagOptions) (parser.Parser, error)

Parse takes a promQL string and converts parses it into a DAG

Types

type ItemType

type ItemType int

ItemType which maps to ItemType in Prometheus. Note that this is temporary and once we decide we want to use this approach then we will just expose the item types in Prometheus code base

Jump to

Keyboard shortcuts

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