Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ElementKey = micro.ElementKey("AlertManagerComponent")
ElementKey is ElementKey for alert manager
Functions ¶
Types ¶
type Alert ¶
type Alert struct {
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
StartsAt time.Time `json:"startsAt"`
EndsAt time.Time `json:"endsAt"`
}
Alert -
type AlertManager ¶
type AlertManager struct {
// contains filtered or unexported fields
}
AlertManager -
func (*AlertManager) InitWebhookHandler ¶
func (a *AlertManager) InitWebhookHandler(h WebhookHandler)
InitWebhookHandler -
type Component ¶
type Component struct {
micro.EmptyComponent
// contains filtered or unexported fields
}
Component is Component for alert manager
type Config ¶
type Config struct {
Enable bool `toml:"enable"`
ServerAddress string `toml:"serveraddress"`
ServerPort int `toml:"serverport"`
URL string `toml:"url"`
}
Config -
type Notification ¶
type Notification struct {
Version string `json:"version"`
GroupKey string `json:"groupKey"`
Status string `json:"status"`
Receiver string `json:"receiver"`
GroupLabels map[string]string `json:"groupLabels"`
CommonLabels map[string]string `json:"commonLabels"`
CommonAnnotations map[string]string `json:"commonAnnotations"`
ExternalURL string `json:"externalURL"`
Alerts []Alert `json:"alerts"`
}
Notification -
type WebhookHandler ¶
WebhookHandler is an interface that wraps the initWebhookHandler method
Click to show internal directories.
Click to hide internal directories.