Documentation ¶
Index ¶
- Constants
- type Condition
- type Conditions
- func (r *Conditions) BeginStagingConditions()
- func (in *Conditions) DeepCopy() *Conditions
- func (in *Conditions) DeepCopyInto(out *Conditions)
- func (r *Conditions) DeleteCondition(types ...string)
- func (r *Conditions) EndStagingConditions()
- func (r *Conditions) Explain() Explain
- func (r *Conditions) FindCondition(cndType string) *Condition
- func (r *Conditions) HasAnyCondition(types ...string) bool
- func (r *Conditions) HasBlockerCondition() bool
- func (r *Conditions) HasCondition(types ...string) bool
- func (r *Conditions) HasConditionCategory(names ...string) bool
- func (r *Conditions) HasCriticalCondition(category ...string) bool
- func (r *Conditions) HasErrorCondition(category ...string) bool
- func (r *Conditions) HasWarnCondition(category ...string) bool
- func (r *Conditions) IsReady() bool
- func (r *Conditions) SetCondition(conditions ...Condition)
- func (r *Conditions) StageCondition(types ...string)
- func (r *Conditions) UpdateConditions(other Conditions)
- type Explain
Constants ¶
const ( ReconcileFailed = "ReconcileFailed" Ready = "Ready" )
Types
const ( True = "True" False = "False" )
Status
const ( // Errors that block Reconcile() and the `Ready` condition. Critical = "Critical" // Errors that block the `Ready` condition. Error = "Error" // Warnings that do not block the `Ready` condition. Warn = "Warn" // Required for the `Ready` condition. Required = "Required" // An advisory condition. Advisory = "Advisory" )
Category
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct { // The condition type. Type string `json:"type"` // The condition status [true,false]. Status string `json:"status"` // The reason for the condition or transition. Reason string `json:"reason,omitempty"` // The condition category. Category string `json:"category"` // The human readable description of the condition. Message string `json:"message,omitempty"` // When the last status transition occurred. LastTransitionTime v1.Time `json:"lastTransitionTime"` // The condition is durable - never un-staged. Durable bool `json:"durable,omitempty"` // A list of items referenced in the `Message`. Items []string `json:"items,omitempty"` // contains filtered or unexported fields }
Condition
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.
type Conditions ¶
type Conditions struct { // List of conditions. List []Condition `json:"conditions,omitempty"` // contains filtered or unexported fields }
Managed collection of conditions. Intended to be included in resource Status. ------------------- Example:
thing.Status.BeginStagingConditions() thing.Status.SetCondition(c) thing.Status.SetCondition(c) thing.Status.SetCondition(c) thing.Status.EndStagingConditions() thing.Status.SetReady(
!thing.Status.HasBlockerCondition(), "Resource Ready.")
func (*Conditions) BeginStagingConditions ¶
func (r *Conditions) BeginStagingConditions()
Begin staging conditions.
func (*Conditions) DeepCopy ¶
func (in *Conditions) DeepCopy() *Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (*Conditions) DeepCopyInto ¶
func (in *Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Conditions) DeleteCondition ¶
func (r *Conditions) DeleteCondition(types ...string)
Delete conditions by type.
func (*Conditions) EndStagingConditions ¶
func (r *Conditions) EndStagingConditions()
End staging conditions. Un-staged conditions are deleted.
func (*Conditions) Explain ¶ added in v0.3.6
func (r *Conditions) Explain() Explain
Get Explain report.
func (*Conditions) FindCondition ¶
func (r *Conditions) FindCondition(cndType string) *Condition
Find a condition by type.
func (*Conditions) HasAnyCondition ¶
func (r *Conditions) HasAnyCondition(types ...string) bool
The collection has Any of the specified conditions.
func (*Conditions) HasBlockerCondition ¶
func (r *Conditions) HasBlockerCondition() bool
The collection contains a `Ready` blocker condition.
func (*Conditions) HasCondition ¶
func (r *Conditions) HasCondition(types ...string) bool
The collection has ALL of the specified conditions.
func (*Conditions) HasConditionCategory ¶
func (r *Conditions) HasConditionCategory(names ...string) bool
The collection contains any conditions with category.
func (*Conditions) HasCriticalCondition ¶
func (r *Conditions) HasCriticalCondition(category ...string) bool
The collection contains a `Critical` error condition. Resource reconcile() should not continue.
func (*Conditions) HasErrorCondition ¶
func (r *Conditions) HasErrorCondition(category ...string) bool
The collection contains an `Error` condition.
func (*Conditions) HasWarnCondition ¶
func (r *Conditions) HasWarnCondition(category ...string) bool
The collection contains a `Warn` condition.
func (*Conditions) IsReady ¶
func (r *Conditions) IsReady() bool
The collection contains the `Ready` condition.
func (*Conditions) SetCondition ¶
func (r *Conditions) SetCondition(conditions ...Condition)
Set (add/update) the specified condition to the collection.
func (*Conditions) StageCondition ¶
func (r *Conditions) StageCondition(types ...string)
Stage an existing condition by type.
func (*Conditions) UpdateConditions ¶ added in v0.1.1
func (r *Conditions) UpdateConditions(other Conditions)
Update conditions.
type Explain ¶ added in v0.3.6
type Explain struct { // conditions added. Added map[string]Condition // conditions updated. Updated map[string]Condition // conditions deleted Deleted map[string]Condition }
Explain report.
func (*Explain) DeepCopy ¶ added in v0.3.6
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Explain.
func (*Explain) DeepCopyInto ¶ added in v0.3.6
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.