Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MailSubjectTemplate, MailHTMLTemplate, MailPlaintextTemplate *pongo2.Template
View Source
var SMTPAddressExpression = regexp.MustCompile(`^(?:([^:]*)(?::(.*))?@)?([^:@]*)(?::(.*))?$`)
Functions ¶
Types ¶
type BatchNotification ¶
type BatchPrefix ¶
type BatchQueue ¶
type BatchQueue struct {
Execute BatchSender
Timeout time.Duration
// contains filtered or unexported fields
}
func (*BatchQueue) Enqueue ¶
func (q *BatchQueue) Enqueue(cfg *chihuahua.Config, check chihuahua.Check, previous chihuahua.CheckResult)
type BatchSender ¶
type BatchSender func(*chihuahua.Config, []BatchNotification, []BatchPrefix)
type CommandNotifier ¶
type CommandNotifier struct {
Command string `hcl:"command"`
}
func (*CommandNotifier) Notify ¶
func (c *CommandNotifier) Notify(cfg *chihuahua.Config, check chihuahua.Check, previous chihuahua.CheckResult)
type ConsoleNotifier ¶
type ConsoleNotifier struct{}
func (*ConsoleNotifier) Notify ¶
func (*ConsoleNotifier) Notify(cfg *chihuahua.Config, check chihuahua.Check, previous chihuahua.CheckResult)
type GotifyNotifier ¶
type GotifyNotifier struct {
Server string `hcl:"server"`
Token string `hcl:"token"`
Priority *int `hcl:"priority"`
}
func (*GotifyNotifier) Notify ¶
func (n *GotifyNotifier) Notify(cfg *chihuahua.Config, check chihuahua.Check, previous chihuahua.CheckResult)
type SMTPNotifier ¶
type SMTPNotifier struct {
From string `hcl:"from"`
To []string `hcl:"to"`
Server *string `hcl:"server"`
UseCRAMMD5 *bool `hcl:"crammd5"`
TimeoutStr *string `hcl:"delay"`
// contains filtered or unexported fields
}
func (*SMTPNotifier) Notify ¶
func (n *SMTPNotifier) Notify(cfg *chihuahua.Config, check chihuahua.Check, previous chihuahua.CheckResult)
func (*SMTPNotifier) SendBatch ¶
func (n *SMTPNotifier) SendBatch(cfg *chihuahua.Config, notifications []BatchNotification, commonPrefix []BatchPrefix)
type SipgateSMSNotifier ¶
type SipgateSMSNotifier struct {
Email string `hcl:"email"`
Password string `hcl:"password"`
To []string `hcl:"to"`
}
func (*SipgateSMSNotifier) Notify ¶
func (c *SipgateSMSNotifier) Notify(cfg *chihuahua.Config, check chihuahua.Check, previous chihuahua.CheckResult)
Click to show internal directories.
Click to hide internal directories.