diff --git a/config/config.go b/config/config.go index 08152b68..2a714232 100644 --- a/config/config.go +++ b/config/config.go @@ -22,6 +22,7 @@ var ( type Config struct { Metrics bool `yaml:"metrics"` + Alerting *core.Alerting `yaml:"alerting"` Services []*core.Service `yaml:"services"` } diff --git a/core/alert.go b/core/alert.go new file mode 100644 index 00000000..1750a926 --- /dev/null +++ b/core/alert.go @@ -0,0 +1,14 @@ +package core + +type Alert struct { + Type AlertType `yaml:"type"` + Enabled bool `yaml:"enabled"` + Threshold int `yaml:"threshold"` + Description string `yaml:"description"` +} + +type AlertType string + +const ( + SlackAlert AlertType = "slack" +) diff --git a/core/alerting.go b/core/alerting.go new file mode 100644 index 00000000..bfba579e --- /dev/null +++ b/core/alerting.go @@ -0,0 +1,5 @@ +package core + +type Alerting struct { + Slack string `yaml:"slack"` +}