alertmgrclient

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertManagerClient

type AlertManagerClient interface {
	SendAlerts(ctx context.Context, alerts []*alerts.Alert) error
	GetName() string
}

AlertManagerClient provides an interface for alert manager client.

func CreateClient

func CreateClient(name, address, basePath string, httpClient *http.Client) AlertManagerClient

CreateClient creates a new alertmanager client with provided http client.

func ProvideNamedAlertManagerClients

func ProvideNamedAlertManagerClients(unmarshaller config.Unmarshaller) []AlertManagerClient

ProvideNamedAlertManagerClients provides a list of alertmanager clients from configuration.

type RealAlertManagerClient

type RealAlertManagerClient struct {
	Name string
	// contains filtered or unexported fields
}

RealAlertManagerClient implements AlertManagerClient interface.

func (*RealAlertManagerClient) GetName

func (ac *RealAlertManagerClient) GetName() string

GetName getter func for alert manager client name.

func (*RealAlertManagerClient) SendAlerts

func (ac *RealAlertManagerClient) SendAlerts(ctx context.Context, alerts []*alerts.Alert) error

SendAlerts sends postable alerts via configured alertmanager http client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL