Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteTracker ¶
DeleteTracker deletes the tracker for the given CR
Types ¶
type StateMachine ¶
type StateMachine struct { CR client.Object Handler handlerspi.StateMachineHandler }
StateMachine contains the fields needed to execute the state machine.
func (*StateMachine) Execute ¶
func (s *StateMachine) Execute(handlerContext handlerspi.HandlerContext) result.Result
Execute runs the state machine starting at the state stored in the tracker. Each CR has a unique tracker for a given generation that tracks the current state. The state machine uses a work handler to implement module specific logic. This state machine code is used by different types of controllers, such as the Module and ModuleAction controllers. It is important to note that if the CR generation increments, then a new tracker is created and the state machine starts from the beginning.
During state machine execution, a result may be returned to indicate that the controller-runtime should requeue after a delay. This is done when a handler is waiting for a resource or some other condition.