Documentation
¶
Overview ¶
Package query parses Graphite queries into an abstract syntax tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expr ¶
type Expr interface {
// contains filtered or unexported methods
}
An Expr represents a graphite query subexpression.
type Metric ¶
type Metric string
A Metric is the name of a graphite metric, a list of words separated by dots. If a Metric contains a glob pattern, it can be expanded to multiple metrics using the Expand method.
func (Metric) Expand ¶
If a Metric contains any brace expansions, Expand expands them and returns a slice of Metrics for each expansion. Otherwise, Expand returns a single-element slice containing the original Metric.
type Query ¶
type Query struct {
Expr
}
A Query is a parsed graphite target query, and may consist of a single metric name (or glob), or a function call.
func Parse ¶
Parse parses a graphite query. The various expressions in a query can be accessed and modified through the methods on the returned Query value.