conditions

package
v0.2.1-0...-49a82ff Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FalseCondition

func FalseCondition(t machinev1.ConditionType, reason string, severity machinev1.ConditionSeverity, messageFormat string, messageArgs ...interface{}) *machinev1.Condition

FalseCondition returns a condition with Status=False and the given type.

func Get

func Get(from interface{}, t machinev1.ConditionType) *machinev1.Condition

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

func GetDeploymentCondition

func GetDeploymentCondition(deployment *appsv1.Deployment, conditionType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition

GetDeploymentCondition returns node condition by type

func GetNodeCondition

func GetNodeCondition(node *corev1.Node, conditionType corev1.NodeConditionType) *corev1.NodeCondition

GetNodeCondition returns node condition by type

func MarkFalse

func MarkFalse(to interface{}, t machinev1.ConditionType, reason string, severity machinev1.ConditionSeverity, messageFormat string, messageArgs ...interface{})

MarkFalse sets Status=False for the condition with the given type.

func MarkTrue

func MarkTrue(to interface{}, t machinev1.ConditionType)

MarkTrue sets Status=True for the condition with the given type.

func MatchCondition

func MatchCondition(expected machinev1.Condition) types.GomegaMatcher

MatchCondition returns a custom matcher to check equality of mapiv1.Condition

func MatchConditions

func MatchConditions(expected machinev1.Conditions) types.GomegaMatcher

MatchConditions returns a custom matcher to check equality of mapiv1.Conditions

func Set

func Set(to interface{}, condition *machinev1.Condition)

Set sets the given condition.

NOTE: If a condition already exists, the LastTransitionTime is updated only if a change is detected in any of the following fields: Status, Reason, Severity and Message.

func TrueCondition

func TrueCondition(t machinev1.ConditionType) *machinev1.Condition

TrueCondition returns a condition with Status=True and the given type.

func UnknownCondition

func UnknownCondition(t machinev1.ConditionType, reason string, messageFormat string, messageArgs ...interface{}) *machinev1.Condition

UnknownCondition returns a condition with Status=Unknown and the given type.

Types

type GetterSetter

type GetterSetter interface {
	runtime.Object
	metav1.Object

	// GetConditions returns the list of conditions for a machine API object.
	GetConditions() machinev1.Conditions

	// SetConditions sets the list of conditions for a machine API object.
	SetConditions(machinev1.Conditions)
}

type MachineHealthCheckWrapper

type MachineHealthCheckWrapper struct {
	*machinev1.MachineHealthCheck
}

func (*MachineHealthCheckWrapper) GetConditions

func (m *MachineHealthCheckWrapper) GetConditions() machinev1.Conditions

func (*MachineHealthCheckWrapper) SetConditions

func (m *MachineHealthCheckWrapper) SetConditions(conditions machinev1.Conditions)

type MachineWrapper

type MachineWrapper struct {
	*machinev1.Machine
}

func (*MachineWrapper) GetConditions

func (m *MachineWrapper) GetConditions() machinev1.Conditions

func (*MachineWrapper) SetConditions

func (m *MachineWrapper) SetConditions(conditions machinev1.Conditions)

Jump to

Keyboard shortcuts

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