Documentation
¶
Index ¶
- Variables
- func NewDefaultPhasedExecutionContext(onPhaseFunc DefaultOnPhaseFunc) *phasedExecutionContext[interface{}]
- func NewPhasedExecutionContext[OperationPhaseDataT any](onPhaseFunc OnPhaseFunc[OperationPhaseDataT]) *phasedExecutionContext[OperationPhaseDataT]
- type DefaultOnPhaseFunc
- type DefaultPhasedExecutionContext
- type DhctlState
- type OnPhaseFunc
- type OperationPhase
- type PhasedExecutionContext
Constants ¶
This section is empty.
Variables ¶
View Source
var (
StopOperationCondition = errors.New("StopOperationCondition")
)
Functions ¶
func NewDefaultPhasedExecutionContext ¶
func NewDefaultPhasedExecutionContext(onPhaseFunc DefaultOnPhaseFunc) *phasedExecutionContext[interface{}]
func NewPhasedExecutionContext ¶
func NewPhasedExecutionContext[OperationPhaseDataT any](onPhaseFunc OnPhaseFunc[OperationPhaseDataT]) *phasedExecutionContext[OperationPhaseDataT]
Types ¶
type DefaultOnPhaseFunc ¶
type DefaultOnPhaseFunc OnPhaseFunc[interface{}]
type DefaultPhasedExecutionContext ¶
type DefaultPhasedExecutionContext PhasedExecutionContext[interface{}]
type DhctlState ¶
func ExtractDhctlState ¶
func ExtractDhctlState(stateCache state.Cache) (res DhctlState, err error)
type OnPhaseFunc ¶
type OnPhaseFunc[OperationPhaseDataT any] func(completedPhase OperationPhase, completedPhaseState DhctlState, completedPhaseData OperationPhaseDataT, nextPhase OperationPhase, nextPhaseCritical bool) error
type OperationPhase ¶
type OperationPhase string
const ( // bootstrap and converge both BaseInfraPhase OperationPhase = "BaseInfra" // bootstrap only RegistryPackagesProxyPhase OperationPhase = "RegistryPackagesProxyBundle" ExecuteBashibleBundlePhase OperationPhase = "ExecuteBashibleBundle" InstallDeckhousePhase OperationPhase = "InstallDeckhouse" CreateResourcesPhase OperationPhase = "CreateResources" InstallAdditionalMastersAndStaticNodes OperationPhase = "InstallAdditionalMastersAndStaticNodes" DeleteResourcesPhase OperationPhase = "DeleteResources" ExecPostBootstrapPhase OperationPhase = "ExecPostBootstrap" // converge only AllNodesPhase OperationPhase = "AllNodes" ScaleToMultiMasterPhase OperationPhase = "ScaleToMultiMaster" ScaleToSingleMasterPhase OperationPhase = "ScaleToSingleMaster" // all FinalizationPhase OperationPhase = "Finalization" )
Define common operations phases for such operations as bootstrap, converge and destroy. Notice that each operation could define own phases (like attach operation do).
type PhasedExecutionContext ¶
type PhasedExecutionContext[OperationPhaseDataT any] interface { InitPipeline(stateCache dstate.Cache) error Finalize(stateCache dstate.Cache) error StartPhase(phase OperationPhase, isCritical bool, stateCache dstate.Cache) (bool, error) CompletePhase(stateCache dstate.Cache, completedPhaseData OperationPhaseDataT) error CompletePipeline(stateCache dstate.Cache) error SwitchPhase(phase OperationPhase, isCritical bool, stateCache dstate.Cache, completedPhaseData OperationPhaseDataT) (bool, error) CompletePhaseAndPipeline(stateCache dstate.Cache, completedPhaseData OperationPhaseDataT) error GetLastState() DhctlState }
Click to show internal directories.
Click to hide internal directories.