helper

package
v1.58.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Now = metav1.Now

Now determines the current metav1.Time.

Functions

func GetCondition

GetCondition returns the condition with the given <conditionType> out of the list of <conditions>. In case the required type could not be found, it returns nil.

func GetOrInitCondition

func GetOrInitCondition(conditions []gardencorev1alpha1.Condition, conditionType gardencorev1alpha1.ConditionType) gardencorev1alpha1.Condition

GetOrInitCondition tries to retrieve the condition with the given condition type from the given conditions. If the condition could not be found, it returns an initialized condition of the given type.

func InitCondition

func InitCondition(conditionType gardencorev1alpha1.ConditionType) gardencorev1alpha1.Condition

InitCondition initializes a new Condition with an Unknown status.

func MergeConditions

func MergeConditions(oldConditions []gardencorev1alpha1.Condition, newConditions ...gardencorev1alpha1.Condition) []gardencorev1alpha1.Condition

MergeConditions merges the given <oldConditions> with the <newConditions>. Existing conditions are superseded by the <newConditions> (depending on the condition type).

func UpdatedCondition

UpdatedCondition updates the properties of one specific condition.

Types

type ConditionBuilder added in v0.34.0

type ConditionBuilder interface {
	WithOldCondition(old gardencorev1alpha1.Condition) ConditionBuilder
	WithStatus(status gardencorev1alpha1.ConditionStatus) ConditionBuilder
	WithReason(reason string) ConditionBuilder
	WithMessage(message string) ConditionBuilder
	WithCodes(codes ...gardencorev1alpha1.ErrorCode) ConditionBuilder
	WithNowFunc(now func() metav1.Time) ConditionBuilder
	Build() (new gardencorev1alpha1.Condition, updated bool)
}

ConditionBuilder build a Condition.

func NewConditionBuilder added in v0.34.0

func NewConditionBuilder(conditionType gardencorev1alpha1.ConditionType) (ConditionBuilder, error)

NewConditionBuilder returns a ConditionBuilder for a specific condition.

type ExtensionResourceStateList added in v1.2.0

type ExtensionResourceStateList []gardencorev1alpha1.ExtensionResourceState

ExtensionResourceStateList is a list of ExtensionResourceStates

func (*ExtensionResourceStateList) Delete added in v1.2.0

func (e *ExtensionResourceStateList) Delete(kind string, name, purpose *string)

Delete removes an ExtensionResourceState from the list by kind, name and purpose

func (*ExtensionResourceStateList) Get added in v1.2.0

Get retrieves an ExtensionResourceState for given kind, name and purpose from a list of ExtensionResourceStates If no ExtensionResourceStates can be found, nil is returned.

func (*ExtensionResourceStateList) Upsert added in v1.2.0

func (e *ExtensionResourceStateList) Upsert(extensionResourceState *gardencorev1alpha1.ExtensionResourceState)

Upsert either inserts or updates an already existing ExtensionResourceState with kind, name and purpose in the list

type GardenerResourceDataList added in v1.4.0

type GardenerResourceDataList []gardencorev1alpha1.GardenerResourceData

GardenerResourceDataList is a list of GardenerResourceData

func (GardenerResourceDataList) DeepCopy added in v1.11.4

DeepCopy makes a deep copy of a GardenerResourceDataList

func (*GardenerResourceDataList) Delete added in v1.4.0

func (g *GardenerResourceDataList) Delete(name string)

Delete deletes an item from the list

func (*GardenerResourceDataList) Get added in v1.4.0

Get returns the item from the list

func (*GardenerResourceDataList) Select added in v1.45.0

Select uses the provided label selector to find data entries with matching labels.

func (*GardenerResourceDataList) Upsert added in v1.4.0

Upsert inserts a new element or updates an existing one

type ResourceDataList added in v1.5.0

type ResourceDataList []gardencorev1alpha1.ResourceData

ResourceDataList is a list of ResourceData

func (*ResourceDataList) Delete added in v1.5.0

Delete deletes an item from the list

func (*ResourceDataList) Get added in v1.5.0

Get returns the item from the list

func (*ResourceDataList) Upsert added in v1.5.0

Upsert inserts a new element or updates an existing one

Jump to

Keyboard shortcuts

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