async

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const FinishedState = "finished"

FinishedState is the state where the executor will finish his execution.

Variables

This section is empty.

Functions

func NewDoguExecutionController

func NewDoguExecutionController() *doguExecutionController

NewDoguExecutionController creates a new instance of doguExecutionController.

Types

type AsyncExecutor

type AsyncExecutor interface {
	// AddStep adds a step.
	AddStep(step AsyncStep)
	// Execute executes all steps.
	Execute(ctx context.Context, dogu *k8sv2.Dogu, currentState string) error
}

AsyncExecutor collects steps and executes them all.

type AsyncStep

type AsyncStep interface {
	// GetStartCondition returns the start condition for the step.
	GetStartCondition() string
	// Execute executes the step and returns the end condition of the step.
	Execute(ctx context.Context, dogu *k8sv2.Dogu) (string, error)
}

AsyncStep capsules an action with a starting and end condition

Jump to

Keyboard shortcuts

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