Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { Type AlertType Active bool LastActive *AlertEvent // NOTE: pointer for nullability, don't mutate the referenced object! LastResolved *AlertEvent // contains filtered or unexported fields }
type AlertEvent ¶
type AlertEvent struct { Type string // either 'raised' or 'resolved' Message json.RawMessage Time time.Time }
AlertEvent contains information about alert state transition
type AlertType ¶
type AlertType struct {
System, Subsystem string
}
AlertType is a unique alert identifier
type Alerting ¶
type Alerting struct {
// contains filtered or unexported fields
}
Alerting provides simple stateful alert system. Consumers can register alerts, which can be raised and resolved.
When an alert is raised or resolved, a related journal entry is recorded.
func NewAlertingSystem ¶
func (*Alerting) AddAlertType ¶
Click to show internal directories.
Click to hide internal directories.