conditions

package
v5.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertEvaluator

type AlertEvaluator interface {
	Eval(reducedValue null.Float) bool
}

func NewAlertEvaluator

func NewAlertEvaluator(model *simplejson.Json) (AlertEvaluator, error)

type AlertQuery

type AlertQuery struct {
	Model        *simplejson.Json
	DatasourceId int64
	From         string
	To           string
}

type NoValueEvaluator

type NoValueEvaluator struct{}

func (*NoValueEvaluator) Eval

func (e *NoValueEvaluator) Eval(reducedValue null.Float) bool

type QueryCondition

type QueryCondition struct {
	Index         int
	Query         AlertQuery
	Reducer       QueryReducer
	Evaluator     AlertEvaluator
	Operator      string
	HandleRequest tsdb.HandleRequestFunc
}

func NewQueryCondition

func NewQueryCondition(model *simplejson.Json, index int) (*QueryCondition, error)

func (*QueryCondition) Eval

type QueryReducer

type QueryReducer interface {
	Reduce(timeSeries *tsdb.TimeSeries) null.Float
}

type RangedEvaluator

type RangedEvaluator struct {
	Type  string
	Lower float64
	Upper float64
}

func (*RangedEvaluator) Eval

func (e *RangedEvaluator) Eval(reducedValue null.Float) bool

type SimpleReducer

type SimpleReducer struct {
	Type string
}

func NewSimpleReducer

func NewSimpleReducer(typ string) *SimpleReducer

func (*SimpleReducer) Reduce

func (s *SimpleReducer) Reduce(series *tsdb.TimeSeries) null.Float

type ThresholdEvaluator

type ThresholdEvaluator struct {
	Type      string
	Threshold float64
}

func (*ThresholdEvaluator) Eval

func (e *ThresholdEvaluator) Eval(reducedValue null.Float) bool

Jump to

Keyboard shortcuts

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