evql

package
v0.1.0-beta11 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateData

func AggregateData(s evdb.DataPoints, agg Aggregator) float64

Types

type Aggregator

type Aggregator interface {
	Aggregate(acc, v float64) float64
	Reset()
	Zero() float64
}

Aggregator aggregates values

func BlankAggregator

func BlankAggregator(agg Aggregator) Aggregator

BlankAggregator returns a separate Aggregator instance

func NewAggregator

func NewAggregator(name string) Aggregator

NewAggregator creates a new Aggregator

type Execer

type Execer interface {
	Exec(ctx context.Context, t db.TimeRange, q string) ([]db.Results, error)
}

Execer executes evql queries

func NewExecer

func NewExecer(scanner db.Scanner) Execer

NewExecer turns a Scanner to an Execer

type Query

type Query struct {
	// contains filtered or unexported fields
}

func Parse

func Parse(query string) (*Query, error)

func (*Query) Eval

func (q *Query) Eval(out []db.Results, t db.TimeRange, results db.Results) []db.Results

Eval executes the query against some results

func (*Query) Queries

func (q *Query) Queries(t db.TimeRange) []db.ScanQuery

Jump to

Keyboard shortcuts

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