Documentation ¶
Index ¶
Constants ¶
View Source
const (
ErrUnsupportedNotificationType = errors.Error("Unsupported notification type")
)
Variables ¶
This section is empty.
Functions ¶
func RegisterNotifier ¶
func RegisterNotifier(plugin *NotifierPlugin)
Types ¶
type NotificationConfig ¶
type Notifier ¶
type Notifier interface { GetType() string GetNotifierId() string // GetIsDefault() bool GetSendReminder() bool GetDisableResolveMessage() bool GetFrequency() time.Duration }
Notifier is responsible for sending alert notifications.
func InitNotifier ¶
func InitNotifier(config NotificationConfig) (Notifier, error)
InitNotifier instantiate a new notifier based on the model
type NotifierFactory ¶
type NotifierFactory func(notification NotificationConfig) (Notifier, error)
type NotifierPlugin ¶
type NotifierPlugin struct { Type string Factory NotifierFactory ValidateCreateData func(cred mcclient.IIdentityProvider, input monitor.NotificationCreateInput) (monitor.NotificationCreateInput, error) }
func GetNotifiers ¶
func GetNotifiers() []*NotifierPlugin
func GetPlugin ¶
func GetPlugin(typ string) (*NotifierPlugin, error)
Click to show internal directories.
Click to hide internal directories.