feat(alerting): working on image rendering with alert notifications
This commit is contained in:
@@ -14,6 +14,7 @@ type Scheduler interface {
|
||||
type Notifier interface {
|
||||
Notify(alertResult *EvalContext)
|
||||
GetType() string
|
||||
NeedsImage() bool
|
||||
}
|
||||
|
||||
type Condition interface {
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -8,3 +8,7 @@ type NotifierBase struct {
|
||||
func (n *NotifierBase) GetType() string {
|
||||
return n.Type
|
||||
}
|
||||
|
||||
func (n *NotifierBase) NeedsImage() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user