Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SeverityColor ¶
SeverityColor returns a hex color for the severity level.
func SeverityEmoji ¶
SeverityEmoji returns an emoji for the severity level.
Types ¶
type ChannelSender ¶
type ChannelSender interface {
Send(ctx context.Context, msg *NotificationMessage) error
ValidateConfig() error
Type() string
}
ChannelSender defines the interface for notification delivery.
type EmailSender ¶
type EmailSender struct {
// contains filtered or unexported fields
}
EmailSender sends notifications via SMTP.
func (*EmailSender) Send ¶
func (e *EmailSender) Send(ctx context.Context, msg *NotificationMessage) error
func (*EmailSender) Type ¶
func (e *EmailSender) Type() string
func (*EmailSender) ValidateConfig ¶
func (e *EmailSender) ValidateConfig() error
type NotificationMessage ¶
type NotificationMessage struct {
Title string `json:"title"`
Body string `json:"body"`
Severity string `json:"severity"`
IssueName string `json:"issueName"`
Namespace string `json:"namespace"`
Resource string `json:"resource"`
State string `json:"state"`
Timestamp time.Time `json:"timestamp"`
Fields map[string]string `json:"fields,omitempty"`
Color string `json:"color"`
URL string `json:"url,omitempty"`
}
NotificationMessage is the structured message sent through channels.
type OpsGenieSender ¶
type OpsGenieSender struct {
// contains filtered or unexported fields
}
OpsGenieSender sends notifications via OpsGenie Alert API.
func (*OpsGenieSender) Send ¶
func (o *OpsGenieSender) Send(ctx context.Context, msg *NotificationMessage) error
func (*OpsGenieSender) Type ¶
func (o *OpsGenieSender) Type() string
func (*OpsGenieSender) ValidateConfig ¶
func (o *OpsGenieSender) ValidateConfig() error
type PagerDutySender ¶
type PagerDutySender struct {
// contains filtered or unexported fields
}
PagerDutySender sends notifications via PagerDuty Events API v2.
func (*PagerDutySender) Send ¶
func (p *PagerDutySender) Send(ctx context.Context, msg *NotificationMessage) error
func (*PagerDutySender) Type ¶
func (p *PagerDutySender) Type() string
func (*PagerDutySender) ValidateConfig ¶
func (p *PagerDutySender) ValidateConfig() error
type SlackSender ¶
type SlackSender struct {
// contains filtered or unexported fields
}
SlackSender sends notifications via Slack Incoming Webhooks.
func (*SlackSender) Send ¶
func (s *SlackSender) Send(ctx context.Context, msg *NotificationMessage) error
func (*SlackSender) Type ¶
func (s *SlackSender) Type() string
func (*SlackSender) ValidateConfig ¶
func (s *SlackSender) ValidateConfig() error
type TeamsSender ¶
type TeamsSender struct {
// contains filtered or unexported fields
}
TeamsSender sends notifications via Microsoft Teams Incoming Webhooks (Adaptive Cards).
func (*TeamsSender) Send ¶
func (t *TeamsSender) Send(ctx context.Context, msg *NotificationMessage) error
func (*TeamsSender) Type ¶
func (t *TeamsSender) Type() string
func (*TeamsSender) ValidateConfig ¶
func (t *TeamsSender) ValidateConfig() error
type WebhookSender ¶
type WebhookSender struct {
// contains filtered or unexported fields
}
WebhookSender sends notifications to a generic HTTP webhook.
func (*WebhookSender) Send ¶
func (w *WebhookSender) Send(ctx context.Context, msg *NotificationMessage) error
func (*WebhookSender) Type ¶
func (w *WebhookSender) Type() string
func (*WebhookSender) ValidateConfig ¶
func (w *WebhookSender) ValidateConfig() error
Click to show internal directories.
Click to hide internal directories.