Documentation ¶
Index ¶
- Variables
- func CatchPanic(ctx context.Context, e Executor) error
- func Dryrun(ctx context.Context) bool
- func NewWarning(format string, args ...interface{}) error
- func WithDryrun(ctx context.Context, dryrun bool) context.Context
- type Conditional
- type Executor
- func NewConditionalExecutor(conditional Conditional, trueExecutor Executor, falseExecutor Executor) Executor
- func NewDebugExecutor(format string, args ...interface{}) Executor
- func NewErrorExecutor(err error) Executor
- func NewInfoExecutor(format string, args ...interface{}) Executor
- func NewParallelExecutor(parallel int, executors ...Executor) Executor
- func NewPipelineExecutor(executors ...Executor) Executor
- func NewWarningExecutor(format string, args ...interface{}) Executor
- func (e Executor) CatchPanic() Executor
- func (e Executor) DeferUntil(ready ReadyFunc) Executor
- func (e Executor) Finally(finally Executor) Executor
- func (e Executor) If(conditional Conditional) Executor
- func (e Executor) IfBool(conditional bool) Executor
- func (e Executor) IfNot(conditional Conditional) Executor
- func (e Executor) Then(then Executor) Executor
- func (e Executor) TraceRegion(regionType string) Executor
- func (e Executor) WrapWith(wrappers ...Wrapper) Executor
- type ReadyFunc
- type Warning
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
var ErrDefer = errors.New("deferred")
ErrDefer that implements `error` but safe to ignore.
Functions ¶
func CatchPanic ¶
CatchPanic wraps the executor with panic handler
func NewWarning ¶
NewWarning returns a warning
Types ¶
type Conditional ¶
Conditional define contract for the conditional predicate
type Executor ¶
Executor define contract for the steps of a workflow
func NewConditionalExecutor ¶
func NewConditionalExecutor(conditional Conditional, trueExecutor Executor, falseExecutor Executor) Executor
NewConditionalExecutor creates a new executor based on conditions
func NewDebugExecutor ¶
NewDebugExecutor is an executor that logs messages
func NewErrorExecutor ¶
NewErrorExecutor creates a new executor that always errors out
func NewInfoExecutor ¶
NewInfoExecutor is an executor that logs messages
func NewParallelExecutor ¶
NewParallelExecutor creates a new executor from a parallel of other executors
func NewPipelineExecutor ¶
NewPipelineExecutor creates a new executor from a series of other executors
func NewWarningExecutor ¶
NewWarningExecutor is an executor that returns a warning
func (Executor) CatchPanic ¶
CatchPanic wraps the executor with panic handler
func (Executor) DeferUntil ¶
DeferUntil a ReadyFunc is ready
func (Executor) If ¶
func (e Executor) If(conditional Conditional) Executor
If only runs this executor if conditional is true
func (Executor) IfNot ¶
func (e Executor) IfNot(conditional Conditional) Executor
IfNot only runs this executor if conditional is true
func (Executor) TraceRegion ¶
TraceRegion wraps the executor with a trace