2016-06-06 11:56:58 +02:00
|
|
|
package alerting
|
|
|
|
|
|
2016-09-06 13:19:05 +02:00
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
)
|
2016-06-06 11:56:58 +02:00
|
|
|
|
2016-07-27 16:29:28 +02:00
|
|
|
type EvalHandler interface {
|
|
|
|
|
Eval(context *EvalContext)
|
2016-06-06 11:56:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Scheduler interface {
|
2016-07-27 16:29:28 +02:00
|
|
|
Tick(time time.Time, execQueue chan *Job)
|
|
|
|
|
Update(rules []*Rule)
|
2016-06-06 11:56:58 +02:00
|
|
|
}
|
2016-06-15 09:19:22 +02:00
|
|
|
|
|
|
|
|
type Notifier interface {
|
2016-07-27 16:29:28 +02:00
|
|
|
Notify(alertResult *EvalContext)
|
2016-07-25 13:52:17 +02:00
|
|
|
GetType() string
|
2016-07-29 14:55:02 +02:00
|
|
|
NeedsImage() bool
|
2016-09-13 15:09:55 +02:00
|
|
|
PassesFilter(rule *Rule) bool
|
2016-06-15 09:19:22 +02:00
|
|
|
}
|
2016-07-19 17:45:37 +02:00
|
|
|
|
2016-07-27 16:29:28 +02:00
|
|
|
type Condition interface {
|
|
|
|
|
Eval(result *EvalContext)
|
2016-07-19 17:45:37 +02:00
|
|
|
}
|