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 ¶
func (c *QueryCondition) Eval(context *alerting.EvalContext) (*alerting.ConditionResult, error)
type QueryReducer ¶
type QueryReducer interface {
Reduce(timeSeries *tsdb.TimeSeries) null.Float
}
type RangedEvaluator ¶
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 ¶
func (*ThresholdEvaluator) Eval ¶
func (e *ThresholdEvaluator) Eval(reducedValue null.Float) bool
Click to show internal directories.
Click to hide internal directories.