mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -06:00
c38f6ff182
* tech(routines): move the async logic from notification to alerting notifier
* tech(notification): reduce code dupe
* fix(notification): dont touch the response unless its an error
* feat(alerting): make alerting exeuction async but flow sync
* tech(alerting): remove commented code
* tech(alerting): remove unused code
* tech(alerting): fix typo
* tech(alerting): implement Context on EvalContext
* tech(alerting): wait for all alerts to return
* feat(alerting): dont allow alert responses to cancel
* Revert "feat(alerting): dont allow alert responses to cancel"
This reverts commit 324b006c96
.
* feat(alerting): give alerts some time to finish before closing down
24 lines
386 B
Go
24 lines
386 B
Go
package alerting
|
|
|
|
import "time"
|
|
|
|
type EvalHandler interface {
|
|
Eval(evalContext *EvalContext)
|
|
}
|
|
|
|
type Scheduler interface {
|
|
Tick(time time.Time, execQueue chan *Job)
|
|
Update(rules []*Rule)
|
|
}
|
|
|
|
type Notifier interface {
|
|
Notify(evalContext *EvalContext) error
|
|
GetType() string
|
|
NeedsImage() bool
|
|
PassesFilter(rule *Rule) bool
|
|
}
|
|
|
|
type Condition interface {
|
|
Eval(result *EvalContext)
|
|
}
|