events

package
v0.0.7-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContext

func WithContext(ctx context.Context, clientset *k8s.ClientSet, k8sNamespace string) (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, k *k8s.ClientSet, k8sNamespace string) (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