alertmgrclient

package
v0.14.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: AGPL-3.0 Imports: 11 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 prommodels.PostableAlerts) error
	GetName() string
}

AlertManagerClient provides an interface for alert manager client.

func CreateClient

func CreateClient(name, address 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 AlertManagerClientConfig

type AlertManagerClientConfig struct {
	Name       string                      `json:"name"`
	Address    string                      `json:"address" validate:"hostname_port|url|fqdn"`
	HTTPConfig commonhttp.HTTPClientConfig `json:"http_client"`
}

AlertManagerClientConfig config for single alertmanager client. swagger:model AlertManagerClientConfig +kubebuilder:object:generate=true

func (*AlertManagerClientConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertManagerClientConfig.

func (*AlertManagerClientConfig) DeepCopyInto

func (in *AlertManagerClientConfig) DeepCopyInto(out *AlertManagerClientConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AlertManagerConfig

type AlertManagerConfig struct {
	Clients []AlertManagerClientConfig `json:"clients,omitempty"`
}

AlertManagerConfig main level config for alertmanager. swagger:model +kubebuilder:object:generate=true

func (*AlertManagerConfig) DeepCopy

func (in *AlertManagerConfig) DeepCopy() *AlertManagerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertManagerConfig.

func (*AlertManagerConfig) DeepCopyInto

func (in *AlertManagerConfig) DeepCopyInto(out *AlertManagerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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

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