Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader interface {
// ActiveAlert reads the active alerts from the Alertmanager
// and returns them as a slice.
ActiveAlerts() ([]models.Alert, error)
// ActiveAlert reads the active alerts with the provided labels from the Alertmanager
// and returns them as a slice.
ActiveAlertsWithLabels(labels []string) ([]models.Alert, error)
// SilencedAlerts reads silenced alerts from the Alertmanager
// and returns them as a slice
SilencedAlerts() ([]models.Alert, error)
}
Loader reads alerts from the Alertmanager API
func NewLoader ¶
func NewLoader(cfg LoaderConfig) (Loader, error)
NewLoader creates a new client Alermanager API
type LoaderConfig ¶
type LoaderConfig struct {
AlertManagerURL string
Token string
RoundTripper http.RoundTripper
}
Click to show internal directories.
Click to hide internal directories.