events

package
v0.0.0-...-3231407 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContext

func WithContext(ctx context.Context) (context.Context, error)

WithContext returns a new context with an event recorder.

Types

type EventRecorder

type EventRecorder interface {
	// Initializing should be called to indicate that the node is initializing.
	Initializing()

	// Connected should be called to indicate that the node is connected to the cluster.
	Connected()

	// Active should be called to indicate that the node is active in the cluster.
	Active()

	// Disconnected should be called to indicate that the node is disconnected from the cluster.
	Disconnected()

	// Failed should be called to indicate that the node has failed.
	Failed()
}

EventRecorder can be used to record various event.

func FromContext

func FromContext(ctx context.Context) EventRecorder

FromContext returns the event recorder from the context.

func NewRecorder

func NewRecorder(ctx context.Context) (EventRecorder, error)

NewRecorder creates a new event recorder.

Jump to

Keyboard shortcuts

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