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