mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(alerting): refactoring
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user