utils

package
v0.0.0-...-3420c2a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(list []string, s string) bool

Contains returns true a list of strings includes a specific string

func FindAPISchemeCondition

FindAPISchemeCondition finds in the condition that has the matching condition type

func Remove

func Remove(list []string, s string) []string

Remove removes a string from a list of strings

func SetAPISchemeCondition

func SetAPISchemeCondition(
	conditions []cloudingressv1alpha1.APISchemeCondition,
	conditionType cloudingressv1alpha1.APISchemeConditionType,
	status corev1.ConditionStatus,
	reason string,
	message string,
	updateConditionCheck UpdateConditionCheck,
) []cloudingressv1alpha1.APISchemeCondition

SetAPISchemeCondition sets a condition on a APIScheme resource's status

func UpdateConditionAlways

func UpdateConditionAlways(_, _, _, _ string) bool

UpdateConditionAlways returns true. The condition will always be updated.

func UpdateConditionIfReasonOrMessageChange

func UpdateConditionIfReasonOrMessageChange(oldReason, oldMessage, newReason, newMessage string) bool

UpdateConditionIfReasonOrMessageChange returns true if there is a change in the reason or the message of the condition.

func UpdateConditionNever

func UpdateConditionNever(_, _, _, _ string) bool

UpdateConditionNever return false. The condition will never be updated, unless there is a change in the status of the condition.

Types

type UpdateConditionCheck

type UpdateConditionCheck func(oldReason, oldMessage, newReason, newMessage string) bool

UpdateConditionCheck tests whether a condition should be updated from the old condition to the new condition. Returns true if the condition should be updated.

Jump to

Keyboard shortcuts

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