workflow

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MessageTerminatedFailedAfterRetries is the message of failed after retries
	MessageTerminatedFailedAfterRetries = "The workflow terminates automatically because the failed times of steps have reached the limit"
	// MessageSuspendFailedAfterRetries is the message of failed after retries
	MessageSuspendFailedAfterRetries = "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
)

Functions

func ComputeWorkflowRevisionHash added in v1.2.0

func ComputeWorkflowRevisionHash(rev string, app *oamcore.Application) (string, error)

ComputeWorkflowRevisionHash compute workflow revision.

func IsFailedAfterRetry added in v1.3.0

func IsFailedAfterRetry(app *oamcore.Application) bool

IsFailedAfterRetry check if application is hang due to FailedAfterRetry

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

	GetSuspendBackoffWaitTime() time.Duration
}

Workflow is used to execute the workflow steps of Application.

func NewWorkflow

NewWorkflow returns a Workflow implementation.

Jump to

Keyboard shortcuts

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