Documentation
¶
Overview ¶
Package workflow provides the base workflow implementation.
BaseWorkflow wraps an orchestration function and implements the Workflow[In, Out] interface from core. It serves as the innermost layer in a decorator chain — decorators (logging, metrics) wrap BaseWorkflow to add cross-cutting concerns without modifying the orchestration logic.
Unlike pipelines (pure stateless transformations), workflows coordinate stateful operations across services, pipelines, repositories, and caches.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseWorkflow ¶
BaseWorkflow wraps an orchestration function and implements the Workflow[In, Out] interface. It provides a functional escape hatch for simple workflows, though workflows are typically stateful (holding service/pipeline/cache references).
func NewBaseWorkflow ¶
func NewBaseWorkflow[In, Out any]( fn func(context.Context, In) (Out, error), ) *BaseWorkflow[In, Out]
NewBaseWorkflow creates a new BaseWorkflow wrapping the given function. Panics if fn is nil.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package decorators provides fluent decorator composition for workflows.
|
Package decorators provides fluent decorator composition for workflows. |