event

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 779

Documentation

Overview

Package event records Kubernetes events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRecorder

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

An APIRecorder records Kubernetes events to an API server.

func NewAPIRecorder

func NewAPIRecorder(r record.EventRecorder) *APIRecorder

NewAPIRecorder returns an APIRecorder that records Kubernetes events to an APIServer using the supplied EventRecorder.

func (*APIRecorder) Event

func (r *APIRecorder) Event(obj runtime.Object, e Event)

Event records the supplied event.

func (*APIRecorder) WithAnnotations

func (r *APIRecorder) WithAnnotations(keysAndValues ...string) Recorder

WithAnnotations returns a new *APIRecorder that includes the supplied annotations with all recorded events.

type Event

type Event struct {
	Type        Type
	Reason      Reason
	Message     string
	Annotations map[string]string
}

An Event relating to a Crossplane resource.

func Normal

func Normal(r Reason, message string, keysAndValues ...string) Event

Normal returns a normal, informational event.

func Warning

func Warning(r Reason, err error, keysAndValues ...string) Event

Warning returns a warning event, typically due to an error.

type NopRecorder

type NopRecorder struct{}

A NopRecorder does nothing.

func NewNopRecorder

func NewNopRecorder() *NopRecorder

NewNopRecorder returns a Recorder that does nothing.

func (*NopRecorder) Event

func (r *NopRecorder) Event(_ runtime.Object, _ Event)

Event does nothing.

func (*NopRecorder) WithAnnotations

func (r *NopRecorder) WithAnnotations(_ ...string) Recorder

WithAnnotations does nothing.

type Reason

type Reason string

Reason an event occurred.

type Recorder

type Recorder interface {
	Event(obj runtime.Object, e Event)
	WithAnnotations(keysAndValues ...string) Recorder
}

A Recorder records Kubernetes events.

type Type

type Type string

A Type of event.

const (
	TypeNormal  Type = "Normal"
	TypeWarning Type = "Warning"
)

Event types. See below for valid types. https://godoc.org/k8s.io/client-go/tools/record#EventRecorder

Jump to

Keyboard shortcuts

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