kubernetes

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromKubernetesEvent

func FromKubernetesEvent(evt corev1.Event) (event.Meta, error)

FromKubernetesEvent converts a Kubernetes Kargo event to a concrete event type

Types

type EventSender

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

func NewEventSender

func NewEventSender(recorder record.EventRecorder) *EventSender

NewEventSender creates a new EventSender that uses the provided EventRecorder. The returned sender's Shutdown method is a no-op; use NewEventSenderWithShutdown when graceful drain is required.

func NewEventSenderWithShutdown added in v1.10.0

func NewEventSenderWithShutdown(
	recorder record.EventRecorder,
	shutdown func(),
) *EventSender

NewEventSenderWithShutdown creates a new EventSender whose Shutdown method calls the provided function to drain the underlying event broadcaster. Use this variant for any processes that must flush events before exiting.

func (*EventSender) Send

func (s *EventSender) Send(_ context.Context, evt event.Meta) error

Send sends the event to the Kubernetes EventRecorder

func (*EventSender) Shutdown added in v1.10.0

func (s *EventSender) Shutdown()

Shutdown drains buffered events. It blocks until all queued events have been processed or the underlying transport gives up. It is a no-op when the sender was created with NewEventSender.

Jump to

Keyboard shortcuts

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