Continue working on #2: Slack alerts

This commit is contained in:
TwinProduction 2020-08-19 19:41:01 -04:00
parent 857fe5eb8c
commit 6596d253aa
3 changed files with 20 additions and 0 deletions

View File

@ -22,6 +22,7 @@ var (
type Config struct {
Metrics bool `yaml:"metrics"`
Alerting *core.Alerting `yaml:"alerting"`
Services []*core.Service `yaml:"services"`
}

14
core/alert.go Normal file
View File

@ -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"
)

5
core/alerting.go Normal file
View File

@ -0,0 +1,5 @@
package core
type Alerting struct {
Slack string `yaml:"slack"`
}