recorder

package
v14.23.1-patch1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Component string
	K8sClient k8sclient.Interface
}

type Interface

type Interface interface {
	// Emit is used to create Kubernetes events.
	Emit(ctx context.Context, obj pkgruntime.Object, reason, message string)
}

func New

func New(c Config) Interface

New creates an event recorder to send custom events to Kubernetes to be recorded for targeted Kubernetes objects.

type Recorder

type Recorder struct {
	record.EventRecorder
}

func (*Recorder) Emit

func (r *Recorder) Emit(ctx context.Context, obj pkgruntime.Object, reason, message string)

Emit writes only informative events like status of creation or updates. Error events will be handled by operatorkit when using microerror.

Jump to

Keyboard shortcuts

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