Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface { context.Context // extendable error delay GetErrorDelay() time.Duration TaskId() string FatalError(error) // wraps goroutine spawning so that recovery is handled and properly logged Go(func()) Sleep(time.Duration) GetSteps() []TaskStep CurrentStepIndex() int CurrentStep() TaskStep ReturnBasicStepSuccess() TaskStepResult ReturnSmallErrorf(format string, args ...any) TaskStepResult ReturnFatalErrorf(format string, args ...any) TaskStepResult Fatalf(format string, args ...any) error }
type LifecycleHooks ¶ added in v0.3.27
type LifecycleHooks interface { // BeforeStep is called before executing a step. The step parameter is guaranteed to be non-nil and can be modified. BeforeStep(step *TaskStep) error // AfterStep is called after executing a step. the result parameter is guaranteed to be non-nil and can be modified. AfterStep(step TaskStep, result *TaskStepResult) error }
type TaskStep ¶
type TaskStep struct { // optional, will be inferred from the runtime function name if not provided Label string StepFunc func() TaskStepResult // optional, all previous steps that dont have a grouping will be grouped together until another step with a grouping is reached StepGrouping string }
func (TaskStep) GetStepLabel ¶ added in v0.3.5
type TaskStepResult ¶
Click to show internal directories.
Click to hide internal directories.