workflow

package
v3.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package,register Package workflow contains types used to model multi-cycle reconciler workflows. +groupName=operators.webcenter.fr

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkflowPhase

type WorkflowPhase string

WorkflowPhase is a typed string enum for saga phase cursors.

func (WorkflowPhase) String

func (p WorkflowPhase) String() string

type WorkflowStatus

type WorkflowStatus struct {
	// CurrentPhase is the active saga phase. Operators use this to determine
	// what work to perform on the current reconcile cycle.
	// +optional
	CurrentPhase WorkflowPhase `json:"currentPhase,omitempty"`

	// PhaseConditions holds per-phase one-shot conditions that track
	// completion status of individual saga phases.
	// +optional
	PhaseConditions []metav1.Condition `json:"phaseConditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=phaseConditions"`
}

WorkflowStatus is a standalone embeddable status sub-struct for multi-cycle workflow sagas. It stores the saga cursor (CurrentPhase) separately from conditions, so conditions remain user-facing readiness indicators.

func (*WorkflowStatus) Advance

func (s *WorkflowStatus) Advance(to WorkflowPhase)

Advance transitions the saga to the next phase.

func (*WorkflowStatus) Current

func (s *WorkflowStatus) Current() WorkflowPhase

Current returns the current saga phase.

func (*WorkflowStatus) DeepCopy added in v3.0.4

func (in *WorkflowStatus) DeepCopy() *WorkflowStatus

DeepCopy returns a deep copy of the receiver, or nil if in is nil.

func (*WorkflowStatus) DeepCopyInto added in v3.0.4

func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus)

DeepCopyInto copies the receiver, writing into out. in must be non-nil.

func (*WorkflowStatus) IsPhase

func (s *WorkflowStatus) IsPhase(phase WorkflowPhase) bool

IsPhase returns true when the saga is at the given phase.

func (*WorkflowStatus) IsPhaseEmpty

func (s *WorkflowStatus) IsPhaseEmpty() bool

IsPhaseEmpty returns true when no phase has been set yet (initial state).

Jump to

Keyboard shortcuts

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