Documentation
¶
Overview ¶
Package sink. This file contains a hack functions to extract metadata from different source events to be used in PagerDuty payload.
Index ¶
- type AnalyticsReporter
- type Elasticsearch
- type EventLink
- type PagerDuty
- type Sink
- type Webhook
- func (w *Webhook) GetStatus() health.PlatformStatus
- func (w *Webhook) IntegrationName() config.CommPlatformIntegration
- func (w *Webhook) PostWebhook(ctx context.Context, jsonPayload *WebhookPayload) (err error)
- func (w *Webhook) SendEvent(ctx context.Context, rawData any, sources []string) error
- func (w *Webhook) Type() config.IntegrationType
- type WebhookPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsReporter ¶
type AnalyticsReporter interface {
// ReportSinkEnabled reports an enabled sink.
ReportSinkEnabled(platform config.CommPlatformIntegration, commGroupIdx int) error
}
AnalyticsReporter defines a reporter that collects analytics data for sinks.
type Elasticsearch ¶
type Elasticsearch struct {
// contains filtered or unexported fields
}
Elasticsearch provides integration with the Elasticsearch solution.
func NewElasticsearch ¶
func NewElasticsearch(log logrus.FieldLogger, commGroupIdx int, c botkubeconfig.Elasticsearch, reporter AnalyticsReporter) (*Elasticsearch, error)
NewElasticsearch creates a new Elasticsearch instance.
func (*Elasticsearch) GetStatus ¶
func (e *Elasticsearch) GetStatus() health.PlatformStatus
GetStatus gets sink status
func (*Elasticsearch) IntegrationName ¶
func (e *Elasticsearch) IntegrationName() botkubeconfig.CommPlatformIntegration
IntegrationName describes the notifier integration name.
func (*Elasticsearch) Type ¶
func (e *Elasticsearch) Type() botkubeconfig.IntegrationType
Type describes the notifier type.
type EventLink ¶
EventLink represents a link in a ChangeEvent and Alert event https://developer.pagerduty.com/docs/events-api-v2/send-change-events/#the-links-property
type PagerDuty ¶
type PagerDuty struct {
// contains filtered or unexported fields
}
PagerDuty provides functionality to notify PagerDuty service about new events.
func NewPagerDuty ¶
func NewPagerDuty(log logrus.FieldLogger, commGroupIdx int, c config.PagerDuty, clusterName string, reporter AnalyticsReporter) (*PagerDuty, error)
NewPagerDuty creates a new PagerDuty instance.
func (*PagerDuty) GetStatus ¶
func (w *PagerDuty) GetStatus() health.PlatformStatus
GetStatus gets sink status.
func (*PagerDuty) IntegrationName ¶
func (w *PagerDuty) IntegrationName() config.CommPlatformIntegration
IntegrationName describes the notifier integration name.
func (*PagerDuty) Type ¶
func (w *PagerDuty) Type() config.IntegrationType
Type describes the notifier type.
type Webhook ¶
type Webhook struct {
URL string
Bindings config.SinkBindings
// contains filtered or unexported fields
}
Webhook provides functionality to notify external service about new events.
func NewWebhook ¶
func NewWebhook(log logrus.FieldLogger, commGroupIdx int, c config.Webhook, reporter AnalyticsReporter) (*Webhook, error)
NewWebhook creates a new Webhook instance.
func (*Webhook) GetStatus ¶
func (w *Webhook) GetStatus() health.PlatformStatus
GetStatus gets sink status
func (*Webhook) IntegrationName ¶
func (w *Webhook) IntegrationName() config.CommPlatformIntegration
IntegrationName describes the notifier integration name.
func (*Webhook) PostWebhook ¶
func (w *Webhook) PostWebhook(ctx context.Context, jsonPayload *WebhookPayload) (err error)
PostWebhook posts webhook to listener
func (*Webhook) Type ¶
func (w *Webhook) Type() config.IntegrationType
Type describes the notifier type.