Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Interval time.Duration `yaml:"interval"` Backends []NotifierBackendConfig `yaml:"backends"` Targets []NotifierTarget `yaml:"targets"` }
type EMailBackend ¶
type EMailBackend struct {
// contains filtered or unexported fields
}
func NewEMailBackend ¶
func NewEMailBackend(name string, conf *NotifierBackendConfigEMail, infoLog, dbgLog *log.Logger) *EMailBackend
func (*EMailBackend) Close ¶
func (emb *EMailBackend) Close() error
func (*EMailBackend) Init ¶
func (emb *EMailBackend) Init() (err error)
func (*EMailBackend) Notify ¶
func (emb *EMailBackend) Notify(ctx context.Context, target NotifierTarget, alert *store.Alert) (bool, error)
func (*EMailBackend) Ready ¶
func (emb *EMailBackend) Ready() bool
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶
type NotifierBackend ¶
type NotifierBackendConfig ¶
type NotifierBackendConfig struct { Name string EMail *NotifierBackendConfigEMail `yaml:"email"` SMSModem *NotifierBackendConfigSMSModem `yaml:"smsModem"` }
type NotifierTarget ¶
type NotifierTarget struct { Name string `yaml:"name"` EMail *NotifierTargetEMail `yaml:"email"` SMS *NotifierTargetSMS `yaml:"sms"` }
type NotifierTargetEMail ¶
type NotifierTargetEMail string
type NotifierTargetSMS ¶
type NotifierTargetSMS string
type SMSModemBackend ¶
type SMSModemBackend struct {
// contains filtered or unexported fields
}
func NewSMSModemBackend ¶
func NewSMSModemBackend(name string, conf *NotifierBackendConfigSMSModem, infoLog, dbgLog *log.Logger) *SMSModemBackend
func (*SMSModemBackend) Close ¶
func (smb *SMSModemBackend) Close() error
func (*SMSModemBackend) Init ¶
func (smb *SMSModemBackend) Init() (err error)
func (*SMSModemBackend) Notify ¶
func (smb *SMSModemBackend) Notify(ctx context.Context, target NotifierTarget, alert *store.Alert) (bool, error)
func (*SMSModemBackend) Ready ¶
func (smb *SMSModemBackend) Ready() bool
Click to show internal directories.
Click to hide internal directories.