Documentation ¶
Overview ¶
Package base is the base implementation of the notification.
Index ¶
- type DefaultNotify
- func (c *DefaultNotify) Channels() []string
- func (c *DefaultNotify) Config(gConf global.NotifySettings) error
- func (c *DefaultNotify) DryNotify(result probe.Result)
- func (c *DefaultNotify) DryNotifyStat(probers []probe.Prober)
- func (c *DefaultNotify) Kind() string
- func (c *DefaultNotify) Name() string
- func (c *DefaultNotify) Notify(result probe.Result)
- func (c *DefaultNotify) NotifyStat(probers []probe.Prober)
- func (c *DefaultNotify) SendWithRetry(title string, message string, tag string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultNotify ¶
type DefaultNotify struct { NotifyKind string `yaml:"-" json:"-"` NotifyFormat report.Format `yaml:"-" json:"-"` NotifySendFunc func(string, string) error `yaml:"-" json:"-"` NotifyName string `yaml:"name" json:"name" jsonschema:"required,title=Notification Name,description=The name of the notification"` NotifyChannels []string `` /* 137-byte string literal not displayed */ Dry bool `` /* 131-byte string literal not displayed */ Timeout time.Duration `` /* 136-byte string literal not displayed */ Retry global.Retry `yaml:"retry,omitempty" json:"retry,omitempty" jsonschema:"title=Retry,description=The retry of the notification"` }
DefaultNotify is the base struct of the Notify
func (*DefaultNotify) Channels ¶ added in v1.6.0
func (c *DefaultNotify) Channels() []string
Channels returns the channels of the notification
func (*DefaultNotify) Config ¶
func (c *DefaultNotify) Config(gConf global.NotifySettings) error
Config is the default configuration for notification
func (*DefaultNotify) DryNotify ¶
func (c *DefaultNotify) DryNotify(result probe.Result)
DryNotify just log the notification message
func (*DefaultNotify) DryNotifyStat ¶
func (c *DefaultNotify) DryNotifyStat(probers []probe.Prober)
DryNotifyStat just log the notification message
func (*DefaultNotify) Kind ¶ added in v1.6.0
func (c *DefaultNotify) Kind() string
Kind returns the kind of the notification
func (*DefaultNotify) Name ¶
func (c *DefaultNotify) Name() string
Name returns the name of the notification
func (*DefaultNotify) Notify ¶
func (c *DefaultNotify) Notify(result probe.Result)
Notify send the result message to the email
func (*DefaultNotify) NotifyStat ¶
func (c *DefaultNotify) NotifyStat(probers []probe.Prober)
NotifyStat send the stat message into the email
func (*DefaultNotify) SendWithRetry ¶
func (c *DefaultNotify) SendWithRetry(title string, message string, tag string)
SendWithRetry sends the notification with retry if got error
Click to show internal directories.
Click to hide internal directories.