Versions in this module Expand all Collapse all v2 v2.0.3 Dec 15, 2020 v2.0.2 Nov 19, 2020 v2.0.1 Nov 11, 2020 v2.0.0 Nov 10, 2020 Changes in this version + func Build(promql string, opts ...Option) (*flux.Spec, error) + func NewRangeOp(rng, offset time.Duration) (*flux.Operation, error) + func NewWhereOperation(metricName string, labels []*LabelMatcher) (*flux.Operation, error) + func Parse(filename string, b []byte, opts ...Option) (interface{}, error) + func ParseFile(filename string, opts ...Option) (i interface{}, err error) + func ParsePromQL(promql string, opts ...Option) (interface{}, error) + func ParseReader(filename string, r io.Reader, opts ...Option) (interface{}, error) + type Aggregate struct + By bool + Labels []*Identifier + Without bool + func (a *Aggregate) QuerySpec() (*flux.Operation, error) + type AggregateExpr struct + Aggregate *Aggregate + Op *Operator + Selector *Selector + func NewAggregateExpr(op *Operator, selector *Selector, group interface{}) (*AggregateExpr, error) + func (a *AggregateExpr) QuerySpec() (*flux.Spec, error) + type Arg interface + Type func() ArgKind + Value func() interface{} + type ArgKind int + const DurationKind + const ExprKind + const IdentifierKind + const NumberKind + const SelectorKind + const StringKind + type Cloner interface + Clone func() interface{} + type Comment struct + Source string + func (c *Comment) QuerySpec() (*flux.Spec, error) + type Duration struct + Dur time.Duration + func (d *Duration) Type() ArgKind + func (d *Duration) Value() interface{} + type Identifier struct + Name string + func NewIdentifierList(first *Identifier, rest interface{}) ([]*Identifier, error) + func (id *Identifier) Type() ArgKind + func (id *Identifier) Value() interface{} + type LabelMatcher struct + Kind MatchKind + Name string + Value Arg + func NewLabelMatcher(ident *Identifier, kind MatchKind, value Arg) (*LabelMatcher, error) + func NewLabelMatches(first *LabelMatcher, rest interface{}) ([]*LabelMatcher, error) + type MatchKind int + const Equal + const NotEqual + const RegexMatch + const RegexNoMatch + type Number struct + Val float64 + func NewNumber(val string) (*Number, error) + func (n *Number) Type() ArgKind + func (n *Number) Value() interface{} + type Operator struct + Arg Arg + Kind OperatorKind + func (o *Operator) QuerySpec() (*flux.Operation, error) + type OperatorKind int + const AvgKind + const BottomKind + const CountKind + const CountValuesKind + const MaxKind + const MinKind + const QuantileKind + const StdVarKind + const StdevKind + const SumKind + const TopKind + const UnknownOpKind + func ToOperatorKind(op string) OperatorKind + type Option func(*parser) Option + func AllowInvalidUTF8(b bool) Option + func Debug(b bool) Option + func Entrypoint(ruleName string) Option + func GlobalStore(key string, value interface{}) Option + func InitState(key string, value interface{}) Option + func MaxExpressions(maxExprCnt uint64) Option + func Memoize(b bool) Option + func Recover(b bool) Option + func Statistics(stats *Stats, choiceNoMatch string) Option + type QueryBuilder interface + QuerySpec func() (*flux.Spec, error) + type Selector struct + LabelMatchers []*LabelMatcher + Name string + Offset time.Duration + Range time.Duration + func NewSelector(metric *Identifier, block, rng, offset interface{}) (*Selector, error) + func (s *Selector) QuerySpec() (*flux.Spec, error) + func (s *Selector) Type() ArgKind + func (s *Selector) Value() interface{} + type Stats struct + ChoiceAltCnt map[string]map[string]int + ExprCnt uint64 + type StringLiteral struct + String string + func (s *StringLiteral) Type() ArgKind + func (s *StringLiteral) Value() interface{} v2.0.0-rc.4 Nov 6, 2020 v2.0.0-rc.3 Oct 29, 2020 v2.0.0-rc.2 Oct 21, 2020 v2.0.0-rc.1 Oct 14, 2020 v2.0.0-rc.0 Sep 29, 2020 v2.0.0-beta.16 Aug 7, 2020 v2.0.0-beta.15 Jul 23, 2020 v2.0.0-beta.14 Jul 8, 2020 v2.0.0-beta.13 Jun 25, 2020 v2.0.0-beta.12 Jun 11, 2020 v2.0.0-beta.11 May 26, 2020 v2.0.0-beta.10 May 7, 2020 v2.0.0-beta.9 Apr 23, 2020 v2.0.0-beta.8 Apr 10, 2020