condition

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 3 Imported by: 12

Documentation

Index

Constants

View Source
const (
	ReconcileFailed = "ReconcileFailed"
	Ready           = "Ready"
)

Types

View Source
const (
	True  = "True"
	False = "False"
)

Status

View Source
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

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Condition) Equal

func (r *Condition) Equal(other Condition) bool

Get whether the conditions are equal.

func (*Condition) Update

func (r *Condition) Update(other Condition) (updated bool)

Update this condition with another's fields.

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

func (in *Explain) DeepCopy() *Explain

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Explain.

func (*Explain) DeepCopyInto added in v0.3.6

func (in *Explain) DeepCopyInto(out *Explain)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Explain) Empty added in v0.3.6

func (r *Explain) Empty() bool

The delta is empty.

func (*Explain) Len added in v0.3.6

func (r *Explain) Len() int

Total number of changes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL