alerting: fix a bunch of lint issues. (#17128)
This commit is contained in:
@@ -7,15 +7,16 @@ import (
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
type EvalHandler interface {
|
||||
type evalHandler interface {
|
||||
Eval(evalContext *EvalContext)
|
||||
}
|
||||
|
||||
type Scheduler interface {
|
||||
type scheduler interface {
|
||||
Tick(time time.Time, execQueue chan *Job)
|
||||
Update(rules []*Rule)
|
||||
}
|
||||
|
||||
// Notifier is responsible for sending alert notifications.
|
||||
type Notifier interface {
|
||||
Notify(evalContext *EvalContext) error
|
||||
GetType() string
|
||||
@@ -48,6 +49,7 @@ func (notifiers notifierStateSlice) ShouldUploadImage() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// ConditionResult is the result of a condition evaluation.
|
||||
type ConditionResult struct {
|
||||
Firing bool
|
||||
NoDataFound bool
|
||||
@@ -55,6 +57,7 @@ type ConditionResult struct {
|
||||
EvalMatches []*EvalMatch
|
||||
}
|
||||
|
||||
// Condition is responsible for evaluating an alert condition.
|
||||
type Condition interface {
|
||||
Eval(result *EvalContext) (*ConditionResult, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user