conditions

package
v0.0.0-...-d09eed2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConditionReason

func ConditionReason[T GenericConditionType](object any, conditionType T) string

func ConditionStatus

func ConditionStatus[T GenericConditionType](object any, conditionType T) corev1.ConditionStatus

func Get

func Get(from Getter, t ConditionType) *metav1.Condition

Get returns the condition with the given type, if the condition does not exist, it returns nil.

Types

type ConditionType

type ConditionType string

ConditionType is a valid value for Condition.Type.

type Conditions

type Conditions []metav1.Condition

type GenericConditionType

type GenericConditionType interface {
	~string
}

type Getter

type Getter interface {
	metav1.Object
	runtime.Object

	// GetConditions returns the list of conditions for an object.
	GetConditions() Conditions
}

Getter interface defines methods that an object should implement in order to use the conditions package for getting conditions.

Jump to

Keyboard shortcuts

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