Documentation
¶
Overview ¶
Package alerter defines the Alerter interface to send alerts whenever a check fails or succeed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alert ¶
type Alert interface { GetService() string // Name of the alert service. GetTarget() string // Target of alert. }
Alert is anything that tells the alerter where to send the alert.
type AlertFunc ¶
AlertFunc is the function that is used to alert the metrics into the provider.
func Initialize ¶
func Initialize(ctx *appcontext.Context, provider Provider) (AlertFunc, error)
Initialize method initializes the alerter and returns a function that alerts the metrics.
type Alerter ¶
type Alerter interface { // Provision sets the alerter's configuration. Provision(*appcontext.Context, Provider) error // Alert actually sends the alert. // // It gets the metrics for which the alert needs to be sent (all metrics // are filtered before passing onto here). The last parameter it has is // a map of check IDs and corresponding alert to be sent. Alert(context.Context, []checker.Metric, map[string]Alert) error }
Alerter is responsible for sending alerts.
Directories
¶
Path | Synopsis |
---|---|
Package discord implements the slack alerter.
|
Package discord implements the slack alerter. |
Package mail implements the mail alerter.
|
Package mail implements the mail alerter. |
Package slack implements the slack alerter.
|
Package slack implements the slack alerter. |
Click to show internal directories.
Click to hide internal directories.