Documentation
¶
Overview ¶
Package sinks contains sinks for emitting ValidationResults.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidEndpoint is returned when an Alertmanager endpoint is invalid. ErrInvalidEndpoint = errors.New("invalid Alertmanager config: endpoint scheme and host are required") // ErrEndpointRequired is returned when the Alertmanager endpoint is not provided. ErrEndpointRequired = errors.New("invalid Alertmanager config: endpoint required") )
View Source
var ErrSinkEmissionFailed = errors.New("sink emission failed")
ErrSinkEmissionFailed is returned when emitting a validation result to a sink fails.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { // Annotations are arbitrary key-value pairs. Annotations map[string]string `json:"annotations"` // Labels are key-value pairs that can be used to group and filter alerts. Labels map[string]string `json:"labels"` }
Alert is an Alertmanager alert.
type AlertmanagerSink ¶
type AlertmanagerSink struct {
// contains filtered or unexported fields
}
AlertmanagerSink is a sink for sending validation results to Alertmanager.
func (*AlertmanagerSink) Configure ¶
func (s *AlertmanagerSink) Configure(c Client, config map[string][]byte) error
Configure configures the AlertmanagerSink with the provided configuration.
func (*AlertmanagerSink) Emit ¶
func (s *AlertmanagerSink) Emit(r v1alpha1.ValidationResult) error
Emit sends a ValidationResult to Alertmanager.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP client for a Sink.
type Sink ¶
type Sink interface { Configure(c Client, config map[string][]byte) error Emit(result v1alpha1.ValidationResult) error }
Sink is an interface for sending validation results to a sink.
Click to show internal directories.
Click to hide internal directories.