event

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UIDField = "uid"
)

Variables

This section is empty.

Functions

func GetObjectRef

func GetObjectRef(ctx context.Context) (*corev1.ObjectReference, bool)

func WithObjectRef

func WithObjectRef(ctx context.Context, objectRef corev1.ObjectReference) context.Context

Types

type EventRecorder

type EventRecorder interface {
	PullingImage(ctx context.Context, image, containerName string)
	PulledImage(ctx context.Context, image, containerName string, duration string)
	FailedToValidateOCI(ctx context.Context, content string)
	FailedToPullImage(ctx context.Context, image, containerName string, err error)
	BackOffPullImage(ctx context.Context, image, containerName string, err error)

	CreatedContainer(ctx context.Context, containerName string)
	StartedContainer(ctx context.Context, containerName string)
	FailedToCreateContainer(ctx context.Context, containerName string, err error)
	FailedToStartContainer(ctx context.Context, containerName string, err error)
	FailedPostStartHook(ctx context.Context, containerName string, cmd []string, err error)
	FailedPreStopHook(ctx context.Context, containerName string, cmd []string, err error)
}

type KubeEventRecorder

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

func NewKubeEventRecorder

func NewKubeEventRecorder(eventRecorder record.EventRecorder) *KubeEventRecorder

func (*KubeEventRecorder) BackOffPullImage

func (r *KubeEventRecorder) BackOffPullImage(ctx context.Context, image, containerName string, err error)

func (*KubeEventRecorder) CreatedContainer

func (r *KubeEventRecorder) CreatedContainer(ctx context.Context, containerName string)

func (*KubeEventRecorder) FailedPostStartHook

func (r *KubeEventRecorder) FailedPostStartHook(ctx context.Context, containerName string, cmd []string, err error)

func (*KubeEventRecorder) FailedPreStopHook

func (r *KubeEventRecorder) FailedPreStopHook(ctx context.Context, containerName string, cmd []string, err error)

func (*KubeEventRecorder) FailedToCreateContainer

func (r *KubeEventRecorder) FailedToCreateContainer(ctx context.Context, containerName string, err error)

func (*KubeEventRecorder) FailedToPullImage

func (r *KubeEventRecorder) FailedToPullImage(ctx context.Context, image, containerName string, err error)

func (*KubeEventRecorder) FailedToStartContainer

func (r *KubeEventRecorder) FailedToStartContainer(ctx context.Context, containerName string, err error)

func (*KubeEventRecorder) FailedToValidateOCI

func (r *KubeEventRecorder) FailedToValidateOCI(ctx context.Context, content string)

func (*KubeEventRecorder) PulledImage

func (r *KubeEventRecorder) PulledImage(ctx context.Context, image, containerName, duration string)

func (*KubeEventRecorder) PullingImage

func (r *KubeEventRecorder) PullingImage(ctx context.Context, image, containerName string)

func (*KubeEventRecorder) StartedContainer

func (r *KubeEventRecorder) StartedContainer(ctx context.Context, containerName string)

type LogEventRecorder

type LogEventRecorder struct{}

func (LogEventRecorder) BackOffPullImage

func (r LogEventRecorder) BackOffPullImage(ctx context.Context, image, _ string, err error)

func (LogEventRecorder) CreatedContainer

func (r LogEventRecorder) CreatedContainer(ctx context.Context, containerName string)

func (LogEventRecorder) FailedPostStartHook

func (r LogEventRecorder) FailedPostStartHook(ctx context.Context, containerName string, cmd []string, err error)

func (LogEventRecorder) FailedPreStopHook

func (r LogEventRecorder) FailedPreStopHook(ctx context.Context, containerName string, cmd []string, err error)

func (LogEventRecorder) FailedToCreateContainer

func (r LogEventRecorder) FailedToCreateContainer(ctx context.Context, containerName string, err error)

func (LogEventRecorder) FailedToPullImage

func (r LogEventRecorder) FailedToPullImage(ctx context.Context, image, _ string, err error)

func (LogEventRecorder) FailedToStartContainer

func (r LogEventRecorder) FailedToStartContainer(ctx context.Context, containerName string, err error)

func (LogEventRecorder) FailedToValidateOCI

func (r LogEventRecorder) FailedToValidateOCI(ctx context.Context, content string)

func (LogEventRecorder) PulledImage

func (r LogEventRecorder) PulledImage(ctx context.Context, image, _, duration string)

func (LogEventRecorder) PullingImage

func (r LogEventRecorder) PullingImage(ctx context.Context, image, _ string)

func (LogEventRecorder) StartedContainer

func (r LogEventRecorder) StartedContainer(ctx context.Context, containerName string)

Jump to

Keyboard shortcuts

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