Documentation ¶
Index ¶
- func Delete(to Setter, t string)
- func FalseCondition(t string, reason string, message string) *metav1.Condition
- func Get(from Getter, t string) *metav1.Condition
- func GetLastTransitionTime(from Getter, t string) *metav1.Time
- func GetMessage(from Getter, t string) string
- func GetReason(from Getter, t string) string
- func Has(from Getter, t string) bool
- func IsFalse(from Getter, t string) bool
- func IsTrue(from Getter, t string) bool
- func IsUnknown(from Getter, t string) bool
- func MarkFalse(to Setter, t string, reason string, message string)
- func MarkTrue(to Setter, t string, reason, message string)
- func MarkUnknown(to Setter, t string, reason, message string)
- func Set(to Setter, condition *metav1.Condition)
- func TrueCondition(t string, reason string, message string) *metav1.Condition
- func UnknownCondition(t string, reason string, message string) *metav1.Condition
- type Getter
- type Setter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FalseCondition ¶
FalseCondition returns a condition with Status=False and the given type.
func Get ¶
Get returns the condition with the given type, if the condition does not exists, it returns nil.
func GetLastTransitionTime ¶
GetLastTransitionTime returns the condition Severity or nil if the condition does not exist (is nil).
func GetMessage ¶
GetMessage returns a nil safe string of Message.
func GetReason ¶
GetReason returns a nil safe string of Reason for the condition with the given type.
func IsFalse ¶
IsFalse is true if the condition with the given type is False, otherwise it return false if the condition is not False or if the condition does not exist (is nil).
func IsTrue ¶
IsTrue is true if the condition with the given type is True, otherwise it return false if the condition is not True or if the condition does not exist (is nil).
func IsUnknown ¶
IsUnknown is true if the condition with the given type is Unknown or if the condition does not exist (is nil).
func MarkUnknown ¶
MarkUnknown sets Status=Unknown for the condition with the given type.
func Set ¶
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 ¶
TrueCondition returns a condition with Status=True and the given type.
Types ¶
type Getter ¶
type Getter interface { client.Object // GetConditions returns the list of conditions for a cluster API object. GetConditions() []metav1.Condition }
Getter interface defines methods that a Cluster API object should implement in order to use the conditions package for getting conditions.