alerting: fix a bunch of lint issues. (#17128)

This commit is contained in:
Carl Bergquist
2019-05-20 12:13:32 +02:00
committed by GitHub
parent a564a54b13
commit bd5bcea5d0
18 changed files with 122 additions and 111 deletions
+5 -2
View File
@@ -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)
}