Documentation
¶
Index ¶
- type AlertMessage
- type AlertsConfig
- type CheckResult
- type CheckSpec
- type CheckStatus
- type CheckType
- type ClientConfig
- type Config
- type DiscordConfig
- type Duration
- type JobSource
- type Lease
- type PagerDutyConfig
- type PublicKeyEntry
- type SMSConfig
- type SMTPConfig
- type ServerConfig
- type TeamsConfig
- type WebhookConfig
- type WorkerConfig
- type WorkerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertMessage ¶
type AlertMessage struct {
CheckName string `json:"check_name"`
Status CheckStatus `json:"status"`
PreviousStatus CheckStatus `json:"previous_status"`
Timestamp time.Time `json:"timestamp"`
Detail string `json:"detail,omitempty"`
}
type AlertsConfig ¶
type AlertsConfig struct {
Webhooks []WebhookConfig `yaml:"webhooks,omitempty"`
SMTP *SMTPConfig `yaml:"smtp,omitempty"`
Discord []DiscordConfig `yaml:"discord,omitempty"`
Teams []TeamsConfig `yaml:"teams,omitempty"`
PagerDuty []PagerDutyConfig `yaml:"pagerduty,omitempty"`
SMS []SMSConfig `yaml:"sms,omitempty"`
}
type CheckResult ¶
type CheckSpec ¶
type CheckSpec struct {
Name string `yaml:"name" json:"name"`
Type CheckType `yaml:"type" json:"type"`
Target string `yaml:"target,omitempty" json:"target,omitempty"`
Interval Duration `yaml:"interval" json:"interval"`
Timeout Duration `yaml:"timeout" json:"timeout"`
Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"`
ExpectedStatus int `yaml:"expected_status,omitempty" json:"expected_status,omitempty"`
MaxSilence Duration `yaml:"max_silence,omitempty" json:"max_silence,omitempty"`
Alerts []string `yaml:"alerts,omitempty" json:"alerts,omitempty"`
LatencyThresholdMs int `yaml:"latency_threshold_ms,omitempty" json:"latency_threshold_ms,omitempty"`
WarnDays int `yaml:"warn_days,omitempty" json:"warn_days,omitempty"`
RecordType string `yaml:"record_type,omitempty" json:"record_type,omitempty"`
LastCheckInAt *time.Time `yaml:"-" json:"-"`
LastCheckInStatus string `yaml:"-" json:"-"`
}
type CheckStatus ¶
type CheckStatus string
const ( StatusUp CheckStatus = "up" StatusDown CheckStatus = "down" StatusDegraded CheckStatus = "degraded" StatusUnknown CheckStatus = "unknown" )
type ClientConfig ¶
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server,omitempty"`
Checks []CheckSpec `yaml:"checks"`
Alerts AlertsConfig `yaml:"alerts,omitempty"`
Worker WorkerConfig `yaml:"worker,omitempty"`
}
type DiscordConfig ¶
type PagerDutyConfig ¶
type PublicKeyEntry ¶
type SMTPConfig ¶
type ServerConfig ¶
type ServerConfig struct {
BindAddress string `yaml:"bind_address,omitempty"`
BindPort int `yaml:"bind_port,omitempty"`
ExternalAddress string `yaml:"external_address,omitempty"`
ExternalPort int `yaml:"external_port,omitempty"`
Concurrency int `yaml:"concurrency,omitempty"`
JoinToken string `yaml:"join_token,omitempty"`
AuthorizedUsers []PublicKeyEntry `yaml:"authorized_users,omitempty"`
}
func (ServerConfig) ExternalURL ¶
func (s ServerConfig) ExternalURL() string
type TeamsConfig ¶
type WebhookConfig ¶
type WorkerConfig ¶
type WorkerInfo ¶
Click to show internal directories.
Click to hide internal directories.