Documentation ¶
Overview ¶
condition defines the condition api
Index ¶
- type Condition
- type ConditionReason
- type ConditionType
- type ConditionedStatus
- func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
- func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
- func (r *ConditionedStatus) Equal(other *ConditionedStatus) bool
- func (r *ConditionedStatus) GetCondition(t ConditionType) Condition
- func (r *ConditionedStatus) HasCondition(t ConditionType) bool
- func (r *ConditionedStatus) IsConditionTrue(t ConditionType) bool
- func (r *ConditionedStatus) SetConditions(c ...Condition)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct {
metav1.Condition `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=condition"`
}
+k8s:openapi-gen=true
func Ready ¶
func Ready() Condition
Ready returns a condition that indicates the resource is ready for use.
func Unknown ¶
func Unknown() Condition
Unknown returns a condition that indicates the resource is in an unknown status.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Condition) Equal ¶
Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.
func (Condition) WithMessage ¶
WithMessage returns a condition by adding the provided message to existing condition.
type ConditionReason ¶
type ConditionReason string
A ConditionReason represents the reason a resource is in a condition.
const ( ConditionReasonReady ConditionReason = "Ready" ConditionReasonFailed ConditionReason = "Failed" ConditionReasonUnknown ConditionReason = "Unknown" )
Reasons a resource is ready or not
type ConditionType ¶
type ConditionType string
A ConditionType represents a condition type for a given KRM resource
const ( // ConditionTypeReady represents the resource ready condition ConditionTypeReady ConditionType = "Ready" )
Condition Types.
type ConditionedStatus ¶
type ConditionedStatus struct { // Conditions of the resource. // +optional // +listType:=map // +listMapKey:=type Conditions []Condition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` }
A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.
func NewConditionedStatus ¶
func NewConditionedStatus(c ...Condition) *ConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
func (*ConditionedStatus) DeepCopy ¶
func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.
func (*ConditionedStatus) DeepCopyInto ¶
func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConditionedStatus) Equal ¶
func (r *ConditionedStatus) Equal(other *ConditionedStatus) bool
Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.
func (*ConditionedStatus) GetCondition ¶
func (r *ConditionedStatus) GetCondition(t ConditionType) Condition
GetCondition returns the condition for the given ConditionKind if exists, otherwise returns nil
func (*ConditionedStatus) HasCondition ¶
func (r *ConditionedStatus) HasCondition(t ConditionType) bool
HasCondition returns if the condition is set
func (*ConditionedStatus) IsConditionTrue ¶
func (r *ConditionedStatus) IsConditionTrue(t ConditionType) bool
func (*ConditionedStatus) SetConditions ¶
func (r *ConditionedStatus) SetConditions(c ...Condition)
SetConditions sets the supplied conditions, replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.