condition

package
v0.0.0-...-db73dbf Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionManager

type ConditionManager struct {
}

func (*ConditionManager) FindCondition

func (c *ConditionManager) FindCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType) (*gcpv1alpha1.Condition, bool)

FindCondition finds the suitable Condition object by looking for adapter's condition list. If none exists, it appends one. the second return code is true if the condition already existed before

func (*ConditionManager) HasCondition

func (c *ConditionManager) HasCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType) bool

HasCondition checks for the existence of a given Condition type

func (*ConditionManager) SetCondition

func (c *ConditionManager) SetCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType, status corev1.ConditionStatus, reason string, message string)

SetCondition sets a condition on a custom resource's status

type Conditions

type Conditions interface {
	SetCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType, status corev1.ConditionStatus, reason string, message string)
	FindCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType) (*gcpv1alpha1.Condition, bool)
	HasCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType) bool
}

Conditions is a wrapper object for actual Condition functions to allow for easier mocking/testing.

func NewConditionManager

func NewConditionManager() Conditions

NewConditionManager returns a ConditionManager object

Jump to

Keyboard shortcuts

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