sinks

package
v0.0.0-...-465b952 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const AlertmanagerSinkName = "alertmanager"

Variables

This section is empty.

Functions

func Close

func Close()

func InitReceiver

func InitReceiver(cfg ReceiverConfig) error

func SendEvent

func SendEvent(name string, ev *kube.EnhancedEvent)

Types

type NewSinkFunc

type NewSinkFunc func(cfg interface{}) (Sink, error)

build sink func

type ReceiverConfig

type ReceiverConfig struct {
	Name   string
	Config interface{}
}

type Sink

type Sink interface {
	Send(ctx context.Context, ev *kube.EnhancedEvent) error
	Close()
}

Sink is the interface that the third-party providers should implement. It should just get the event and transform it depending on its configuration and submit it. Error handling for retries etc. should be handled inside for now.

func NewAlertmanagerSink

func NewAlertmanagerSink(cfg interface{}) (Sink, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL