conditions

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access interface {
	GetCondition(t Type) *Condition
}

Access is the interface that allows retrieval of a particular condition

type Condition

type Condition struct {
	// Type of condition
	// +required
	Type Type `json:"type" description:"type of status condition"`

	// Status of the condition, one of True, False, Unknown.
	// +required
	Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"`

	// LastTransitionTime last time the condition transit from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" description:"last time the condition transit from one status to another"`

	// The reason for the condition last transition.
	// +optional
	Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"`

	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty" description:"human-readable message indicating details about last transition"`
}

Condition defines the required fields for populating Build controllers Conditions

func (*Condition) DeepCopyInto

func (c *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. TODO: Added manually, it was not autogenereated.

func (*Condition) GetMessage

func (c *Condition) GetMessage() string

GetMessage returns the condition Message, it ensures that by getting the Message the call will not panic if the Condition is not present

func (*Condition) GetReason

func (c *Condition) GetReason() string

GetReason returns the condition Reason, it ensures that by getting the Reason the call will not panic if the Condition is not present

func (*Condition) GetStatus

func (c *Condition) GetStatus() corev1.ConditionStatus

GetStatus returns the condition Status, it ensures that by getting the Status the call will not panic if the Condition is not present

type Conditions

type Conditions []Condition

Conditions defines a list of Condition

type Implementor

type Implementor struct {
	Connect StatusConditions
}

Implementor implements the Manager interface

func (Implementor) GetCondition

func (i Implementor) GetCondition(t Type) *Condition

GetCondition retrieves a particular condition based on the type

func (Implementor) SetCondition

func (i Implementor) SetCondition(aCondition *Condition)

SetCondition updates a condition by generating the same list of conditions with the provided one This does not preserve the order when multiple conditions exist.

type Manager

type Manager interface {
	Access
	SetCondition(*Condition)
}

Manager is the interface that allows to operate on a particular condition, by getting or setting it

func Manage

func Manage(status StatusConditions) Manager

Manage enables an object that implements the StatusConditions interface to get access to the Manager

type StatusConditions

type StatusConditions interface {
	GetConditions() *Conditions
	SetConditions(Conditions)
}

StatusConditions provides access to the conditions of an object that have a Status field

type Type

type Type string

Type used for defining the conditiont Type field flavour

const (
	// Succeeded specifies that the resource has finished.
	// For resources that run to completion.
	Succeeded Type = "Succeeded"
)

Jump to

Keyboard shortcuts

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