expr

package
v0.12.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlphabeticallyByPart

func AlphabeticallyByPart(metrics []*types.MetricData, part int) sort.Interface

AlphabeticallyByPart returns a byPartAlphabetical that will sort 'metrics' alphabetically by 'part'.

func ByPart

func ByPart(metrics []*types.MetricData, part int) byPartBase

ByPart returns a byPartBase suitable for sorting 'metrics' by 'part'.

func EvalExpr

func EvalExpr(e parser.Expr, from, until int64, values map[parser.MetricRequest][]*types.MetricData) ([]*types.MetricData, error)

EvalExpr is the main expression evaluator

func RewriteExpr added in v0.9.0

func RewriteExpr(e parser.Expr, from, until int64, values map[parser.MetricRequest][]*types.MetricData) (bool, []string, error)

RewriteExpr expands targets that use applyByNode into a new list of targets. eg: applyByNode(foo*, 1, "%") -> (true, ["foo1", "foo2"], nil) sumSeries(foo) -> (false, nil, nil) Assumes that applyByNode only appears as the outermost function.

func SortMetrics

func SortMetrics(metrics []*types.MetricData, mfetch parser.MetricRequest)

SortMetrics sort metric data alphabetically.

Types

This section is empty.

Jump to

Keyboard shortcuts

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