2020-08-20 01:41:01 +02:00
|
|
|
package core
|
|
|
|
|
2020-08-22 20:15:44 +02:00
|
|
|
// Alert is the service's alert configuration
|
2020-08-20 01:41:01 +02:00
|
|
|
type Alert struct {
|
2020-08-22 20:15:44 +02:00
|
|
|
// Type of alert
|
|
|
|
Type AlertType `yaml:"type"`
|
|
|
|
|
|
|
|
// Enabled defines whether or not the alert is enabled
|
|
|
|
Enabled bool `yaml:"enabled"`
|
|
|
|
|
|
|
|
// Threshold is the number of failures in a row needed before triggering the alert
|
|
|
|
Threshold int `yaml:"threshold"`
|
|
|
|
|
|
|
|
// Description of the alert. Will be included in the alert sent.
|
|
|
|
Description string `yaml:"description"`
|
2020-08-20 01:41:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type AlertType string
|
|
|
|
|
|
|
|
const (
|
2020-08-28 04:23:21 +02:00
|
|
|
SlackAlert AlertType = "slack"
|
2020-09-04 23:43:14 +02:00
|
|
|
TwilioAlert AlertType = "twilio"
|
2020-08-28 04:23:21 +02:00
|
|
|
CustomAlert AlertType = "custom"
|
2020-08-20 01:41:01 +02:00
|
|
|
)
|