Documentation ¶
Index ¶
- func AddOrUpdateStatusConditions(conditions []toolchainv1alpha1.Condition, ...) ([]toolchainv1alpha1.Condition, bool)
- func AddOrUpdateStatusConditionsWithLastUpdatedTimestamp(conditions []toolchainv1alpha1.Condition, ...) []toolchainv1alpha1.Condition
- func AddStatusConditions(conditions []toolchainv1alpha1.Condition, ...) []toolchainv1alpha1.Condition
- func Count(conditions []toolchainv1alpha1.Condition, ...) int
- func FindConditionByType(conditions []toolchainv1alpha1.Condition, ...) (toolchainv1alpha1.Condition, bool)
- func HasConditionReason(conditions []toolchainv1alpha1.Condition, ...) bool
- func IsFalse(conditions []toolchainv1alpha1.Condition, ...) bool
- func IsFalseWithReason(conditions []toolchainv1alpha1.Condition, ...) bool
- func IsNotTrue(conditions []toolchainv1alpha1.Condition, ...) bool
- func IsTrue(conditions []toolchainv1alpha1.Condition, ...) bool
- func IsTrueWithReason(conditions []toolchainv1alpha1.Condition, ...) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOrUpdateStatusConditions ¶
func AddOrUpdateStatusConditions(conditions []toolchainv1alpha1.Condition, newConditions ...toolchainv1alpha1.Condition) ([]toolchainv1alpha1.Condition, bool)
AddOrUpdateStatusConditions appends the new conditions to the condition slice. If there is already a condition with the same type in the current condition array then the condition is updated in the result slice. If the condition is not changed then the same unmodified slice is returned. Also returns a bool flag which indicates if the conditions where updated/added
func AddOrUpdateStatusConditionsWithLastUpdatedTimestamp ¶
func AddOrUpdateStatusConditionsWithLastUpdatedTimestamp(conditions []toolchainv1alpha1.Condition, newConditions ...toolchainv1alpha1.Condition) []toolchainv1alpha1.Condition
AddOrUpdateStatusConditionsWithLastUpdatedTimestamp appends the new conditions to the condition slice. If there is already a condition with the same type in the current condition array then the condition is updated in the result slice. The condition's LastUpdatedTime is always updated to the current time even if nothing else is changed.
func AddStatusConditions ¶
func AddStatusConditions(conditions []toolchainv1alpha1.Condition, newConditions ...toolchainv1alpha1.Condition) []toolchainv1alpha1.Condition
AddStatusConditions adds the given conditions *without* checking for duplicate types (as opposed to `AddOrUpdateStatusConditions`) Also, it sets the `LastTransitionTime` to `metav1.Now()` for each given condition if needed
func Count ¶
func Count(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType, status apiv1.ConditionStatus, reason string) int
Count counts the conditions that match the given type/status/reason
func FindConditionByType ¶
func FindConditionByType(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType) (toolchainv1alpha1.Condition, bool)
FindConditionByType returns first Condition with given conditionType along with bool flag which indicates if the Condition is found or not
func HasConditionReason ¶
func HasConditionReason(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType, reason string) bool
HasConditionReason returns true if the first Condition with given conditionType from the given slice has the specified reason
func IsFalse ¶
func IsFalse(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType) bool
IsFalse returns `true` if the condition with the given condition type is found among the conditions and its status is set to `false`. Returns false for unknown conditions and conditions with status set to True.
func IsFalseWithReason ¶
func IsFalseWithReason(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType, reason string) bool
IsFalseWithReason returns `true` if the condition with the given condition type is found among the conditions and its status is set to `false` with the given reason.
func IsNotTrue ¶
func IsNotTrue(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType) bool
IsNotTrue returns `true` if the condition with the given condition type has an Unknown or `false` status
func IsTrue ¶
func IsTrue(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType) bool
IsTrue returns `true` if the condition with the given condition type is found among the conditions and its status is set to `true`. Returns false for unknown conditions and conditions with status set to False.
func IsTrueWithReason ¶
func IsTrueWithReason(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType, reason string) bool
IsTrueWithReason returns `true` if the condition with the given condition type is found among the conditions and its status is set to `true` with the given reason.
Types ¶
This section is empty.