mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-26 09:54:05 +01:00
28 lines
726 B
Go
28 lines
726 B
Go
package core
|
|
|
|
// Alert is the service's alert configuration
|
|
type Alert struct {
|
|
// 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"`
|
|
|
|
// SendOnResolved defines whether to send a second notification when the issue has been resolved
|
|
SendOnResolved bool `yaml:"send-on-resolved"`
|
|
}
|
|
|
|
type AlertType string
|
|
|
|
const (
|
|
SlackAlert AlertType = "slack"
|
|
TwilioAlert AlertType = "twilio"
|
|
CustomAlert AlertType = "custom"
|
|
)
|