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 ¶
func (in *AlertManagerClientConfig) DeepCopy() *AlertManagerClientConfig
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 ¶
func (ac *RealAlertManagerClient) SendAlerts(ctx context.Context, alerts prommodels.PostableAlerts) error
SendAlerts sends postable alerts via configured alertmanager http client.