Documentation
¶
Overview ¶
Package selvedge binds execution activities to native Selvedge apps and workflow scopes. Applications retain ownership of app lifecycle, workflows, submission, transactions, and backend-specific policies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register[I, O any](activities *Activities, activity execution.Activity[I, O], handler func(context.Context, I) (O, error), options sv.ActivityOptions) error
Register installs a typed activity with native Selvedge options and codecs. Its generic signature preserves the input and output types for Selvedge; Activities therefore does not implement execution.ActivityRegistrar.
Types ¶
type Activities ¶
type Activities struct {
// contains filtered or unexported fields
}
Activities registers named handlers on one caller-owned Selvedge app. Register all handlers before starting the app so recovery can find them.
func New ¶
func New(app *sv.App) (*Activities, error)
New binds activity registration to app without starting or stopping it.
func (*Activities) Scope ¶
func (a *Activities) Scope(ctx *sv.WorkflowContext) execution.ActivityExecutor
Scope binds execution to ctx, including its cancellation and detached-scope behavior. The context.Context arguments of execution calls do not replace this native workflow context. Futures retain the scope that scheduled them.