events

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const NormalType = "Normal"
View Source
const QualifiedResourceNameToken = "%Q"
View Source
const ResourceHealthyStatusChangedReason = "ResourceHealthyStatusChanged"
View Source
const ResourceOutputChangedReason = "ResourceOutputChanged"
View Source
const StampedObjectAppliedReason = "StampedObjectApplied"
View Source
const StampedObjectRemovedReason = "StampedObjectRemoved"

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, rec OwnerEventRecorder) context.Context

NewContext returns a new Context, derived from ctx, which carries the provided OwnerEventRecorder.

Types

type OwnerEventRecorder

type OwnerEventRecorder interface {
	// Event uses an EventRecorder to record an event against this OwnerEventRecorder's owner object
	Event(eventtype, reason, message string)

	// Eventf is just like Event, but with Sprintf for the message field.
	Eventf(eventtype, reason, messageFmt string, args ...interface{})

	// AnnotatedEventf is just like eventf, but with annotations attached
	AnnotatedEventf(annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{})

	// ResourceEventf is just like Eventf, but the token %Q will be substituted with the qualified name of the provided unstructured resource
	ResourceEventf(eventtype, reason, messageFmt string, resource *unstructured.Unstructured, args ...interface{})
}

func FromContextOrDie

func FromContextOrDie(ctx context.Context) OwnerEventRecorder

FromContextOrDie returns a OwnerEventRecorder from ctx. If no OwnerEventRecorder is found, this panics

func FromEventRecorder

func FromEventRecorder(rec record.EventRecorder, ownerObj runtime.Object, mapper meta.RESTMapper, log logr.Logger) OwnerEventRecorder

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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