dsl

package
v0.0.0-...-403286f Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallStack

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

func (*CallStack) Pop

func (s *CallStack) Pop() *FuncCall

func (*CallStack) Push

func (s *CallStack) Push(n *FuncCall)

type DSGetter

type DSGetter interface {
	GetDSById(ds_id int64) *rrd.DataSource
	DsIdsFromIdent(ident string) map[string]int64
	SeriesQuery(ds *rrd.DataSource, from, to time.Time, maxPoints int64) (rrd.Series, error)
}

type DslCtx

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

func NewDslCtx

func NewDslCtx(dsGetter DSGetter, src string, from, to, maxPoints int64) *DslCtx

func (*DslCtx) ParseDsl

func (dc *DslCtx) ParseDsl() (SeriesMap, error)

type FuncCall

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

type FuncMap

type FuncMap map[string]dslFuncType

type FuncVisitor

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

func (*FuncVisitor) Visit

func (v *FuncVisitor) Visit(node ast.Node) ast.Visitor

type SeriesList

type SeriesList struct {
	SeriesSlice
	// contains filtered or unexported fields
}

func NewSeriesListFromArgs

func NewSeriesListFromArgs(dc *DslCtx, args []interface{}) (*SeriesList, error)

func (*SeriesList) Alias

func (sl *SeriesList) Alias(s ...string) string

func (*SeriesList) Align

func (sl *SeriesList) Align()

func (*SeriesList) Avg

func (sl *SeriesList) Avg() float64

func (*SeriesList) Close

func (sl *SeriesList) Close() error

func (*SeriesList) CurrentPosBeginsAfter

func (sl *SeriesList) CurrentPosBeginsAfter() time.Time

func (*SeriesList) CurrentPosEndsOn

func (sl *SeriesList) CurrentPosEndsOn() time.Time

func (*SeriesList) Diff

func (sl *SeriesList) Diff() float64

func (*SeriesList) First

func (sl *SeriesList) First() float64

func (*SeriesList) GroupByMs

func (sl *SeriesList) GroupByMs(ms ...int64) int64

func (*SeriesList) LastUpdate

func (sl *SeriesList) LastUpdate() time.Time

func (*SeriesList) Max

func (sl *SeriesList) Max() float64

func (*SeriesList) MaxPoints

func (sl *SeriesList) MaxPoints(n ...int64) int64

func (*SeriesList) Min

func (sl *SeriesList) Min() float64

func (*SeriesList) Next

func (sl *SeriesList) Next() bool

func (*SeriesList) Percentile

func (sl *SeriesList) Percentile(p float64) float64

func (*SeriesList) Range

func (sl *SeriesList) Range() float64

func (*SeriesList) StepMs

func (sl *SeriesList) StepMs() int64

func (*SeriesList) Sum

func (sl *SeriesList) Sum() (result float64)

func (*SeriesList) TimeRange

func (sl *SeriesList) TimeRange(t ...time.Time) (time.Time, time.Time)

type SeriesMap

type SeriesMap map[string]rrd.Series

func (SeriesMap) SortedKeys

func (sm SeriesMap) SortedKeys() []string

type SeriesSlice

type SeriesSlice []rrd.Series

type SliceSeries

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

func (*SliceSeries) Alias

func (s *SliceSeries) Alias(a ...string) string

func (*SliceSeries) Close

func (s *SliceSeries) Close() error

func (*SliceSeries) CurrentPosBeginsAfter

func (s *SliceSeries) CurrentPosBeginsAfter() time.Time

func (*SliceSeries) CurrentPosEndsOn

func (s *SliceSeries) CurrentPosEndsOn() time.Time

func (*SliceSeries) CurrentValue

func (s *SliceSeries) CurrentValue() float64

func (*SliceSeries) GroupByMs

func (s *SliceSeries) GroupByMs(ms ...int64) int64

func (*SliceSeries) LastUpdate

func (s *SliceSeries) LastUpdate() time.Time

func (*SliceSeries) MaxPoints

func (s *SliceSeries) MaxPoints(...int64) int64

func (*SliceSeries) Next

func (s *SliceSeries) Next() bool

func (*SliceSeries) StepMs

func (s *SliceSeries) StepMs() int64

func (*SliceSeries) TimeRange

func (s *SliceSeries) TimeRange(...time.Time) (time.Time, time.Time)

Jump to

Keyboard shortcuts

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