feat(alerting): progress on alerting backend

This commit is contained in:
Torkel Ödegaard
2016-07-20 14:28:02 +02:00
parent 3219d98a92
commit 0ce55600bb
6 changed files with 138 additions and 17 deletions
+7 -3
View File
@@ -1,6 +1,10 @@
package alerting
import "time"
import (
"time"
"github.com/grafana/grafana/pkg/tsdb"
)
type AlertHandler interface {
Execute(rule *AlertRule, resultChan chan *AlertResultContext)
@@ -20,9 +24,9 @@ type AlertCondition interface {
}
type QueryReducer interface {
Reduce() float64
Reduce(timeSeries *tsdb.TimeSeries) float64
}
type AlertEvaluator interface {
Eval() bool
Eval(timeSeries *tsdb.TimeSeries, reducedValue float64) bool
}