events

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package events implements the eventing framework to receive and relay kubernetes events, and a framework to publish events to the Kubernetes API server.

Index

Constants

View Source
const (
	// InvalidCLIParameters signifies invalid CLI parameters
	InvalidCLIParameters = "FatalInvalidCLIParameters"

	// InitializationError signifies an error during initialization
	InitializationError = "FatalInitializationError"

	// InvalidCertificateManager signifies that the certificate manager is invalid
	InvalidCertificateManager = "FatalInvalidCertificateManager"

	// CertificateIssuanceFailure signifies that a request to issue a certificate failed
	CertificateIssuanceFailure = "FatalCertificateIssuanceFailure"
)

Kubernetes Fatal Event reasons Fatal events are prefixed with 'Fatal' to help the event recording framework to wait for fatal events to be recorded prior to aborting.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventRecorder

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

EventRecorder is a type used to record Kubernetes events

func GenericEventRecorder

func GenericEventRecorder() *EventRecorder

GenericEventRecorder is a singleton that returns a generic EventRecorder type. The EventRecorder returned needs to be explicitly initialized by calling the 'Initialize' method on the object

func NewEventRecorder

func NewEventRecorder(object runtime.Object, kubeClient kubernetes.Interface, namespace string) (*EventRecorder, error)

NewEventRecorder returns a new EventRecorder object and an error in case of errors

func (*EventRecorder) ErrorEvent

func (e *EventRecorder) ErrorEvent(err error, reason string, messageFmt string, args ...interface{})

ErrorEvent records a Warning Kubernetes event

func (*EventRecorder) FatalEvent

func (e *EventRecorder) FatalEvent(err error, reason string, messageFmt string, args ...interface{})

FatalEvent records a Warning Kubernetes event

func (*EventRecorder) Initialize

func (e *EventRecorder) Initialize(object runtime.Object, kubeClient kubernetes.Interface, namespace string) error

Initialize initializes an uninitialized EventRecorder object

func (*EventRecorder) NormalEvent

func (e *EventRecorder) NormalEvent(reason string, messageFmt string, args ...interface{})

NormalEvent records a Normal Kubernetes event

func (*EventRecorder) WarnEvent

func (e *EventRecorder) WarnEvent(reason string, messageFmt string, args ...interface{})

WarnEvent records a Warning Kubernetes event

type PubSubMessage

type PubSubMessage struct {
	Kind   announcements.Kind
	OldObj interface{}
	NewObj interface{}
}

PubSubMessage represents a common messages abstraction to pass through the PubSub interface

Jump to

Keyboard shortcuts

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