Documentation
¶
Index ¶
- func GetTolerance(schedule ScheduleConfig) time.Duration
- func WithinTolerance(now, scheduleTime time.Time, schedule ScheduleConfig) error
- type Alert
- type Check
- type Config
- type EveryConfig
- type HealthChecksIO
- type MockAlerter
- type PagerDuty
- type PartialDay
- type ScheduleConfig
- type ServerConfig
- type Slack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTolerance ¶ added in v0.6.0
func GetTolerance(schedule ScheduleConfig) time.Duration
func WithinTolerance ¶ added in v0.6.0
func WithinTolerance(now, scheduleTime time.Time, schedule ScheduleConfig) error
Types ¶
type Alert ¶
type Alert struct {
HealthChecksIO *HealthChecksIO `yaml:"healthchecksio"`
PagerDuty *PagerDuty `yaml:"pagerduty"`
Slack *Slack `yaml:"slack"`
Mock *MockAlerter `yaml:"mock"`
}
type Check ¶
type Check struct {
ID string `yaml:"id"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Schedule ScheduleConfig `yaml:"schedule"`
Alert Alert `yaml:"alert"`
}
type Config ¶
type Config struct {
Checks []Check `yaml:"checks"`
Alert Alert `yaml:"alert"`
Server ServerConfig `yaml:"server"`
}
type EveryConfig ¶
type HealthChecksIO ¶ added in v0.8.0
type HealthChecksIO struct {
ApiKey string `yaml:"apiKey"`
}
func ReadHealthChecksIOFromEnv ¶ added in v0.8.0
func ReadHealthChecksIOFromEnv() *HealthChecksIO
type MockAlerter ¶ added in v0.8.1
type MockAlerter struct{}
type PagerDuty ¶
type PagerDuty struct {
ApiKey string `yaml:"apiKey"`
EscalationPolicy string `yaml:"escalationPolicy"`
// From is an email address of a valid user associated with the account making the request
From string `yaml:"from"`
RoutingKey string `yaml:"routingKey"`
Urgency string `yaml:"urgency"`
}
func ReadPagerDutyFromEnv ¶
func ReadPagerDutyFromEnv() *PagerDuty
type PartialDay ¶
type ScheduleConfig ¶
type ScheduleConfig struct {
Every *EveryConfig `yaml:"every"`
Weekdays *PartialDay `yaml:"weekdays"`
BankingDays *PartialDay `yaml:"bankingDays"`
}
type ServerConfig ¶ added in v0.2.1
type ServerConfig struct {
BindAddress string `yaml:"bindAddress"`
}
Click to show internal directories.
Click to hide internal directories.