Documentation
¶
Index ¶
- type ConditionManager
- func (c *ConditionManager) FindCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType) (*gcpv1alpha1.Condition, bool)
- func (c *ConditionManager) HasCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType) bool
- func (c *ConditionManager) SetCondition(conditions *[]gcpv1alpha1.Condition, conditionType gcpv1alpha1.ConditionType, ...)
- type Conditions
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
Click to show internal directories.
Click to hide internal directories.