Open
Description
Describe the solution you'd like
Users need a workflow-local var that is scoped only to the current workflow when accessed via code.
Rough sketch:
- A user can have
var myValue workflow.LocalVar[string]
myValue.Get(ctx)
returns the workflow-specific value (zero value if never set, no need for aTryGet
, a user can choose to wrap in nil-able type for optional/unset if needed)myValue.Set(ctx, value)
sets the workflow-specific value
This is basically just type-safe sugar for top-level context value. See temporalio/features#571.