feat(alerting): working on image rendering with alert notifications

This commit is contained in:
Torkel Ödegaard
2016-07-29 14:55:02 +02:00
parent f9a28d3306
commit 4fc50742a0
7 changed files with 106 additions and 22 deletions
+1
View File
@@ -14,6 +14,7 @@ type Scheduler interface {
type Notifier interface {
Notify(alertResult *EvalContext)
GetType() string
NeedsImage() bool
}
type Condition interface {
+4
View File
@@ -22,6 +22,10 @@ func (n *RootNotifier) GetType() string {
return "root"
}
func (n *RootNotifier) NeedsImage() bool {
return false
}
func (n *RootNotifier) Notify(context *EvalContext) {
n.log.Info("Sending notifications for", "ruleId", context.Rule.Id)
+4
View File
@@ -8,3 +8,7 @@ type NotifierBase struct {
func (n *NotifierBase) GetType() string {
return n.Type
}
func (n *NotifierBase) NeedsImage() bool {
return true
}