Documentation ¶
Index ¶
- type Backend
- type BackendOption
- type MockBackend
- func (_m *MockBackend) CancelWorkflowInstance(ctx context.Context, instance core.WorkflowInstance) error
- func (_m *MockBackend) CompleteActivityTask(ctx context.Context, instance core.WorkflowInstance, activityID string, ...) error
- func (_m *MockBackend) CompleteWorkflowTask(ctx context.Context, instance core.WorkflowInstance, ...) error
- func (_m *MockBackend) CreateWorkflowInstance(ctx context.Context, event history.WorkflowEvent) error
- func (_m *MockBackend) ExtendActivityTask(ctx context.Context, activityID string) error
- func (_m *MockBackend) ExtendWorkflowTask(ctx context.Context, instance core.WorkflowInstance) error
- func (_m *MockBackend) GetActivityTask(ctx context.Context) (*task.Activity, error)
- func (_m *MockBackend) GetWorkflowTask(ctx context.Context) (*task.Workflow, error)
- func (_m *MockBackend) SignalWorkflow(ctx context.Context, instanceID string, event history.Event) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { // CreateWorkflowInstance creates a new workflow instance CreateWorkflowInstance(ctx context.Context, event history.WorkflowEvent) error // CancelWorkflowInstance cancels a running workflow instance CancelWorkflowInstance(ctx context.Context, instance workflow.Instance) error // SignalWorkflow signals a running workflow instance SignalWorkflow(ctx context.Context, instanceID string, event history.Event) error // GetWorkflowInstance returns a pending workflow task or nil if there are no pending worflow executions GetWorkflowTask(ctx context.Context) (*task.Workflow, error) // ExtendWorkflowTask extends the lock of a workflow task ExtendWorkflowTask(ctx context.Context, instance workflow.Instance) error // CompleteWorkflowTask checkpoints a workflow task retrieved using GetWorkflowTask // // This checkpoints the execution. events are new events from the last workflow execution // which will be added to the workflow instance history. workflowEvents are new events for the // completed or other workflow instances. CompleteWorkflowTask(ctx context.Context, instance workflow.Instance, executedEvents []history.Event, workflowEvents []history.WorkflowEvent) error // GetActivityTask returns a pending activity task or nil if there are no pending activities GetActivityTask(ctx context.Context) (*task.Activity, error) // CompleteActivityTask completes a activity task retrieved using GetActivityTask CompleteActivityTask(ctx context.Context, instance workflow.Instance, activityID string, event history.Event) error // ExtendActivityTask extends the lock of an activity task ExtendActivityTask(ctx context.Context, activityID string) error }
type BackendOption ¶
type BackendOption func(*Options)
func WithStickyTimeout ¶
func WithStickyTimeout(timeout time.Duration) BackendOption
type MockBackend ¶
MockBackend is an autogenerated mock type for the Backend type
func (*MockBackend) CancelWorkflowInstance ¶
func (_m *MockBackend) CancelWorkflowInstance(ctx context.Context, instance core.WorkflowInstance) error
CancelWorkflowInstance provides a mock function with given fields: ctx, instance
func (*MockBackend) CompleteActivityTask ¶
func (_m *MockBackend) CompleteActivityTask(ctx context.Context, instance core.WorkflowInstance, activityID string, event history.Event) error
CompleteActivityTask provides a mock function with given fields: ctx, instance, activityID, event
func (*MockBackend) CompleteWorkflowTask ¶
func (_m *MockBackend) CompleteWorkflowTask(ctx context.Context, instance core.WorkflowInstance, executedEvents []history.Event, workflowEvents []history.WorkflowEvent) error
CompleteWorkflowTask provides a mock function with given fields: ctx, instance, executedEvents, workflowEvents
func (*MockBackend) CreateWorkflowInstance ¶
func (_m *MockBackend) CreateWorkflowInstance(ctx context.Context, event history.WorkflowEvent) error
CreateWorkflowInstance provides a mock function with given fields: ctx, event
func (*MockBackend) ExtendActivityTask ¶
func (_m *MockBackend) ExtendActivityTask(ctx context.Context, activityID string) error
ExtendActivityTask provides a mock function with given fields: ctx, activityID
func (*MockBackend) ExtendWorkflowTask ¶
func (_m *MockBackend) ExtendWorkflowTask(ctx context.Context, instance core.WorkflowInstance) error
ExtendWorkflowTask provides a mock function with given fields: ctx, instance
func (*MockBackend) GetActivityTask ¶
GetActivityTask provides a mock function with given fields: ctx
func (*MockBackend) GetWorkflowTask ¶
GetWorkflowTask provides a mock function with given fields: ctx
func (*MockBackend) SignalWorkflow ¶
func (_m *MockBackend) SignalWorkflow(ctx context.Context, instanceID string, event history.Event) error
SignalWorkflow provides a mock function with given fields: ctx, instanceID, event