conditions

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 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 ApplicationNotHealthyCondition

type ApplicationNotHealthyCondition struct {
	// contains filtered or unexported fields
}

func NewApplicationNotHealthyCondition

func NewApplicationNotHealthyCondition() *ApplicationNotHealthyCondition

func (*ApplicationNotHealthyCondition) GetData

func (this *ApplicationNotHealthyCondition) GetData() *metav1.Condition

func (*ApplicationNotHealthyCondition) GetPreviousData

func (this *ApplicationNotHealthyCondition) GetPreviousData() *metav1.Condition

func (*ApplicationNotHealthyCondition) GetType

func (this *ApplicationNotHealthyCondition) GetType() ConditionType

func (*ApplicationNotHealthyCondition) IsActive

func (this *ApplicationNotHealthyCondition) IsActive() bool

func (*ApplicationNotHealthyCondition) Reset

func (this *ApplicationNotHealthyCondition) Reset()

func (*ApplicationNotHealthyCondition) SetType

func (this *ApplicationNotHealthyCondition) SetType(ctype ConditionType)

func (*ApplicationNotHealthyCondition) TransitionHealthy

func (this *ApplicationNotHealthyCondition) TransitionHealthy()

func (*ApplicationNotHealthyCondition) TransitionNotLive

func (this *ApplicationNotHealthyCondition) TransitionNotLive()

func (*ApplicationNotHealthyCondition) TransitionNotReady

func (this *ApplicationNotHealthyCondition) TransitionNotReady()

type ApplicationNotHealthyConditionReason

type ApplicationNotHealthyConditionReason string
const (
	// Priority ordered
	APPLICATION_NOT_HEALTHY_REASON_READINESS ApplicationNotHealthyConditionReason = "ReadinessProbeFailed"
	APPLICATION_NOT_HEALTHY_REASON_LIVENESS  ApplicationNotHealthyConditionReason = "LivenessProbeFailed"
)

type Condition

type Condition interface {
	SetType(ConditionType)

	GetType() ConditionType

	// References an internal state. Make a copy before using the data unless intended.
	GetPreviousData() *metav1.Condition

	// References an internal state. Make a copy before using the data unless intended.
	GetData() *metav1.Condition

	// Display the condition in status
	IsActive() bool

	// Clear the condition status and remember previous
	Reset()
}

type ConditionManager

type ConditionManager interface {
	GetReadyCondition() *ReadyCondition

	GetConfigurationErrorCondition() *ConfigurationErrorCondition

	GetApplicationNotHealthyCondition() *ApplicationNotHealthyCondition

	// Runs after the control loop is stable
	AfterLoop()

	// Compute the latest conditions
	// Runs after the control loop is stable as well, after AfterLoop(). TODO refactor!
	Execute() []metav1.Condition
}

func NewConditionManager

func NewConditionManager(ctx context.LoopContext) ConditionManager

type ConditionType

type ConditionType string
const (
	CONDITION_TYPE_READY                   ConditionType = "Ready"
	CONDITION_TYPE_CONFIGURATION_ERROR     ConditionType = "ConfigurationError"
	CONDITION_TYPE_APPLICATION_NOT_HEALTHY ConditionType = "ApplicationNotHealthy"
)

type ConfigurationErrorCondition

type ConfigurationErrorCondition struct {
	// contains filtered or unexported fields
}

func NewConfigurationErrorCondition

func NewConfigurationErrorCondition() *ConfigurationErrorCondition

func (*ConfigurationErrorCondition) GetData

func (this *ConfigurationErrorCondition) GetData() *metav1.Condition

func (*ConfigurationErrorCondition) GetPreviousData

func (this *ConfigurationErrorCondition) GetPreviousData() *metav1.Condition

func (*ConfigurationErrorCondition) GetType

func (this *ConfigurationErrorCondition) GetType() ConditionType

func (*ConfigurationErrorCondition) IsActive

func (this *ConfigurationErrorCondition) IsActive() bool

func (*ConfigurationErrorCondition) Reset

func (this *ConfigurationErrorCondition) Reset()

func (*ConfigurationErrorCondition) SetType

func (this *ConfigurationErrorCondition) SetType(ctype ConditionType)

func (*ConfigurationErrorCondition) TransitionInvalid

func (this *ConfigurationErrorCondition) TransitionInvalid(details string, optionPath string)

func (*ConfigurationErrorCondition) TransitionInvalidPersistence

func (this *ConfigurationErrorCondition) TransitionInvalidPersistence(currentValue string)

func (*ConfigurationErrorCondition) TransitionRequired

func (this *ConfigurationErrorCondition) TransitionRequired(optionPath string)

type ConfigurationErrorConditionReason

type ConfigurationErrorConditionReason string
const (
	// Priority ordered
	CONFIGURATION_ERROR_CONDITION_REASON_INVALID_PERSISTENCE ConfigurationErrorConditionReason = "InvalidPersistenceOption"
	CONFIGURATION_ERROR_CONDITION_REASON_REQUIRED            ConfigurationErrorConditionReason = "MissingRequiredOption"
	CONFIGURATION_ERROR_CONDITION_REASON_INVALID             ConfigurationErrorConditionReason = "InvalidValue"
)

type ReadyCondition

type ReadyCondition struct {
	// contains filtered or unexported fields
}

func NewReadyCondition

func NewReadyCondition() *ReadyCondition

func (*ReadyCondition) GetData

func (this *ReadyCondition) GetData() *metav1.Condition

func (*ReadyCondition) GetPreviousData

func (this *ReadyCondition) GetPreviousData() *metav1.Condition

func (*ReadyCondition) GetType

func (this *ReadyCondition) GetType() ConditionType

func (*ReadyCondition) IsActive

func (this *ReadyCondition) IsActive() bool

func (*ReadyCondition) Reset

func (this *ReadyCondition) Reset()

func (*ReadyCondition) SetType

func (this *ReadyCondition) SetType(ctype ConditionType)

func (*ReadyCondition) TransitionError

func (this *ReadyCondition) TransitionError()

func (*ReadyCondition) TransitionInitializing

func (this *ReadyCondition) TransitionInitializing()

func (*ReadyCondition) TransitionReconciled

func (this *ReadyCondition) TransitionReconciled()

func (*ReadyCondition) TransitionReconciling

func (this *ReadyCondition) TransitionReconciling()

type ReadyConditionReason

type ReadyConditionReason string
const (
	// Priority ordered
	READY_CONDITION_REASON_ERROR        ReadyConditionReason = "Error"
	READY_CONDITION_REASON_INITIALIZING ReadyConditionReason = "Initializing"
	READY_CONDITION_REASON_RECONCILING  ReadyConditionReason = "Reconciling"
	READY_CONDITION_REASON_RECONCILED   ReadyConditionReason = "Reconciled"
)

Jump to

Keyboard shortcuts

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