Add Messagebird as an alerting provider

This commit is contained in:
cemturker
2020-11-23 22:20:06 +01:00
parent 66bf1c23df
commit a870d3e43f
13 changed files with 190 additions and 15 deletions

View File

@ -202,6 +202,7 @@ func validateAlertingConfig(config *Config) {
alertTypes := []core.AlertType{
core.SlackAlert,
core.MattermostAlert,
core.MessagebirdAlert,
core.TwilioAlert,
core.PagerDutyAlert,
core.CustomAlert,
@ -238,6 +239,12 @@ func GetAlertingProviderByAlertType(config *Config, alertType core.AlertType) pr
return nil
}
return config.Alerting.Mattermost
case core.MessagebirdAlert:
if config.Alerting.Messagebird == nil {
// Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil
return nil
}
return config.Alerting.Messagebird
case core.TwilioAlert:
if config.Alerting.Twilio == nil {
// Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil