Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidConfig = func(name Type) error { return fmt.Errorf("invalid config for %q sender", name) }
ErrInvalidConfig signals an invalid sender config
Functions ¶
Types ¶
type Alert ¶
type Alert struct { // Title is the short title that summarizes the purpose of the alert. Title string // Text is the longer textual content that further explains what this alert is about. Text string // Tags contains a sequence of tags for categorizing the alerts. Tags []string // Severity determines the severity of this alert. Severity Severity }
Alert encapsulates the state of an alert.
type Config ¶
type Config struct { Type Type Sender interface{} }
Config is the container for the alert sender configuration structure.
type Sender ¶
type Sender interface { // Send emits an alert. Send(Alert) error // Type returns the type that identifies a particular sender. Type() Type }
Sender is the minimal interface all alert senders have to implement.
type Severity ¶
type Severity uint8
Severity is the type alias for alert's severity level.
func ParseSeverityFromString ¶
ParseSeverityFromString parses the severity from the string representation.
Click to show internal directories.
Click to hide internal directories.