feat(alerting): refactoring conditions out to seperate package

This commit is contained in:
Torkel Ödegaard
2016-07-27 16:18:10 +02:00
parent ae5f8a76d9
commit 6aaf4c97a2
11 changed files with 161 additions and 126 deletions
+1 -13
View File
@@ -1,10 +1,6 @@
package alerting
import (
"time"
"github.com/grafana/grafana/pkg/tsdb"
)
import "time"
type AlertHandler interface {
Execute(context *AlertResultContext)
@@ -23,11 +19,3 @@ type Notifier interface {
type AlertCondition interface {
Eval(result *AlertResultContext)
}
type QueryReducer interface {
Reduce(timeSeries *tsdb.TimeSeries) float64
}
type AlertEvaluator interface {
Eval(timeSeries *tsdb.TimeSeries, reducedValue float64) bool
}