destination

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventSink

func NewEventSink(
	eventClient typedv1.EventInterface,
) record.EventSink

Types

type Destination

type Destination interface {
	Push(context.Context, config.WebhookMessage) error
	Name() string
}

func NewK8sDestination

func NewK8sDestination(
	lg *slog.Logger,
) (Destination, error)

type EventSinkImpl

type EventSinkImpl struct {
	Interface typedv1.EventInterface
}

func (*EventSinkImpl) Create

func (e *EventSinkImpl) Create(event *corev1.Event) (*corev1.Event, error)

Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.

func (*EventSinkImpl) Patch

func (e *EventSinkImpl) Patch(event *corev1.Event, data []byte) (*corev1.Event, error)

Patch applies the patch and returns the patched event, and an error, if there is any.

func (*EventSinkImpl) Update

func (e *EventSinkImpl) Update(event *corev1.Event) (*corev1.Event, error)

Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.

type K8sDestination

type K8sDestination struct {
	// contains filtered or unexported fields
}

func (K8sDestination) Name

func (k K8sDestination) Name() string

func (K8sDestination) Push

Jump to

Keyboard shortcuts

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