feat(alerting): refactoring

This commit is contained in:
Torkel Ödegaard
2016-07-27 16:29:28 +02:00
parent 6aaf4c97a2
commit 717cce014b
24 changed files with 214 additions and 523 deletions

View File

@@ -2,20 +2,20 @@ package alerting
import "time"
type AlertHandler interface {
Execute(context *AlertResultContext)
type EvalHandler interface {
Eval(context *EvalContext)
}
type Scheduler interface {
Tick(time time.Time, execQueue chan *AlertJob)
Update(rules []*AlertRule)
Tick(time time.Time, execQueue chan *Job)
Update(rules []*Rule)
}
type Notifier interface {
Notify(alertResult *AlertResultContext)
Notify(alertResult *EvalContext)
GetType() string
}
type AlertCondition interface {
Eval(result *AlertResultContext)
type Condition interface {
Eval(result *EvalContext)
}