Documentation
¶
Index ¶
- Variables
- type Library
- type Workflow
- func (w *Workflow) AddCompletionCallbacks(ctx chasm.MutableContext, eventTime *timestamppb.Timestamp, requestID string, ...) error
- func (w *Workflow) ContextMetadata(_ chasm.Context) map[string]string
- func (w *Workflow) GetNexusCompletion(ctx chasm.Context, requestID string) (nexusrpc.CompleteOperationOptions, error)
- func (w *Workflow) LifecycleState(_ chasm.Context) chasm.LifecycleState
- func (w *Workflow) ProcessCloseCallbacks(ctx chasm.MutableContext) error
- func (w *Workflow) Terminate(_ chasm.MutableContext, _ chasm.TerminateComponentRequest) (chasm.TerminateComponentResponse, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Library ¶ added in v1.30.0
type Library struct {
chasm.UnimplementedLibrary
}
func NewLibrary ¶ added in v1.30.0
func NewLibrary() *Library
func (*Library) Components ¶ added in v1.30.0
func (l *Library) Components() []*chasm.RegistrableComponent
type Workflow ¶ added in v1.30.0
type Workflow struct {
chasm.UnimplementedComponent
// For now, workflow state is managed by mutable_state_impl, not CHASM engine, leaving it empty as CHASM expects a
// state object.
*emptypb.Empty
// MSPointer is a special in-memory field for accessing the underlying mutable state.
chasm.MSPointer
// Callbacks map is used to store the callbacks for the workflow.
Callbacks chasm.Map[string, *callback.Callback]
}
func NewWorkflow ¶ added in v1.30.0
func NewWorkflow( _ chasm.MutableContext, msPointer chasm.MSPointer, ) *Workflow
func (*Workflow) AddCompletionCallbacks ¶ added in v1.30.0
func (w *Workflow) AddCompletionCallbacks( ctx chasm.MutableContext, eventTime *timestamppb.Timestamp, requestID string, completionCallbacks []*commonpb.Callback, maxCallbacksPerWorkflow int, ) error
AddCompletionCallbacks creates completion callbacks using the CHASM implementation. maxCallbacksPerWorkflow is the configured maximum number of callbacks allowed per workflow.
func (*Workflow) ContextMetadata ¶ added in v1.31.0
func (*Workflow) GetNexusCompletion ¶ added in v1.30.0
func (*Workflow) LifecycleState ¶ added in v1.30.0
func (w *Workflow) LifecycleState( _ chasm.Context, ) chasm.LifecycleState
func (*Workflow) ProcessCloseCallbacks ¶ added in v1.30.0
func (w *Workflow) ProcessCloseCallbacks(ctx chasm.MutableContext) error
ProcessCloseCallbacks triggers "WorkflowClosed" callbacks using the CHASM implementation. It iterates through all callbacks and schedules WorkflowClosed ones that are in STANDBY state.
func (*Workflow) Terminate ¶ added in v1.31.0
func (w *Workflow) Terminate( _ chasm.MutableContext, _ chasm.TerminateComponentRequest, ) (chasm.TerminateComponentResponse, error)
Click to show internal directories.
Click to hide internal directories.