notifiers

package
v0.0.0-...-d04f0d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MailSubjectTemplate, MailHTMLTemplate, MailPlaintextTemplate *pongo2.Template
View Source
var SMTPAddressExpression = regexp.MustCompile(`^(?:([^:]*)(?::(.*))?@)?([^:@]*)(?::(.*))?$`)

Functions

func Content

func Content(cfg *chihuahua.Config, check chihuahua.Check, previous chihuahua.CheckResult) string

Types

type BatchNotification

type BatchNotification struct {
	chihuahua.Check
	FullID         []string
	FullName       []string
	PreviousResult chihuahua.CheckResult
}

type BatchPrefix

type BatchPrefix struct {
	ID   string
	Name string
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL