Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MessageFailedAfterRetries is the message of failed after retries MessageFailedAfterRetries = "The workflow suspends automatically because the failed times of steps have reached the limit" // MessageInitializingWorkflow is the message of initializing workflow MessageInitializingWorkflow = "Initializing workflow" )
Variables ¶
View Source
var ( // DisableRecorder optimize workflow by disable recorder DisableRecorder = false // StepStatusCache cache the step status StepStatusCache sync.Map // MaxWorkflowWaitBackoffTime is the max time to wait before reconcile wait workflow again MaxWorkflowWaitBackoffTime = 60 // MaxWorkflowFailedBackoffTime is the max time to wait before reconcile failed workflow again MaxWorkflowFailedBackoffTime = 300 )
Functions ¶
func ComputeWorkflowRevisionHash ¶
func ComputeWorkflowRevisionHash(rev string, app *oamcore.Application) (string, error)
ComputeWorkflowRevisionHash compute workflow revision.
Types ¶
type Workflow ¶
type Workflow interface { // ExecuteSteps executes the steps of an Application with given steps of rendered resources. // It returns done=true only if all steps are executed and succeeded. ExecuteSteps(ctx monitorContext.Context, appRev *v1beta1.ApplicationRevision, taskRunners []types.TaskRunner) (state common.WorkflowState, err error) // Trace record workflow state in controllerRevision. Trace() error // GetBackoffWaitTime returns the wait time for next retry. GetBackoffWaitTime() time.Duration }
Workflow is used to execute the workflow steps of Application.
func NewWorkflow ¶
func NewWorkflow(app *oamcore.Application, cli client.Client, mode common.WorkflowMode) Workflow
NewWorkflow returns a Workflow implementation.
Click to show internal directories.
Click to hide internal directories.