events

package
v0.11.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package events provides a simple event system for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Event

func Event(er record.EventRecorder, obj runtime.Object, message string)

Event is a wrapper around the Event method of the EventRecorder interface. It uses the default EventType and Reason.

func EventWithOptions

func EventWithOptions(er record.EventRecorder, obj runtime.Object, message string, options *Option)

EventWithOptions is a wrapper around the Event method of the EventRecorder interface. It uses the EventType and Reason passed as parameters in options.

Types

type EventType

type EventType string

EventType is the type used to define the reason of an event.

const (
	// Normal is the default reason to use.
	Normal EventType = "Normal"
	// Warning is the default reason to use.
	Warning EventType = "Warning"
	// Error is the default reason to use.
	Error EventType = "Error"
)

type Option

type Option struct {
	Reason    Reason
	EventType EventType
}

Option is the type used to define the options of an event.

type Reason

type Reason string

Reason is the type used to define the reason of an event.

const (
	// Processing is the default reason to use.
	Processing Reason = "Processing"
)

Jump to

Keyboard shortcuts

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