Documentation
¶
Index ¶
- type TaskHubGrpcClient
- func (c *TaskHubGrpcClient) FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID, ...) (*backend.WorkflowMetadata, error)deprecated
- func (c *TaskHubGrpcClient) FetchWorkflowMetadata(ctx context.Context, id api.InstanceID, ...) (*backend.WorkflowMetadata, error)
- func (c *TaskHubGrpcClient) GetInstanceHistory(ctx context.Context, id api.InstanceID, opts ...api.GetInstanceHistoryOptions) (*backend.GetInstanceHistoryResponse, error)
- func (c *TaskHubGrpcClient) ListInstanceIDs(ctx context.Context, opts ...api.ListInstanceIDsOptions) (*backend.ListInstanceIDsResponse, error)
- func (c *TaskHubGrpcClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) errordeprecated
- func (c *TaskHubGrpcClient) PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error
- func (c *TaskHubGrpcClient) RaiseEvent(ctx context.Context, id api.InstanceID, eventName string, ...) error
- func (c *TaskHubGrpcClient) RerunWorkflowFromEvent(ctx context.Context, id api.InstanceID, eventID uint32, ...) (api.InstanceID, error)
- func (c *TaskHubGrpcClient) ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) errordeprecated
- func (c *TaskHubGrpcClient) ResumeWorkflow(ctx context.Context, id api.InstanceID, reason string) error
- func (c *TaskHubGrpcClient) ScheduleNewOrchestration(ctx context.Context, workflow string, opts ...api.NewWorkflowOptions) (api.InstanceID, error)deprecated
- func (c *TaskHubGrpcClient) ScheduleNewWorkflow(ctx context.Context, workflow string, opts ...api.NewWorkflowOptions) (api.InstanceID, error)
- func (c *TaskHubGrpcClient) StartWorkItemListener(ctx context.Context, r *task.TaskRegistry) error
- func (c *TaskHubGrpcClient) SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) errordeprecated
- func (c *TaskHubGrpcClient) SuspendWorkflow(ctx context.Context, id api.InstanceID, reason string) error
- func (c *TaskHubGrpcClient) TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) errordeprecated
- func (c *TaskHubGrpcClient) TerminateWorkflow(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error
- func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID, ...) (*backend.WorkflowMetadata, error)deprecated
- func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID, ...) (*backend.WorkflowMetadata, error)deprecated
- func (c *TaskHubGrpcClient) WaitForWorkflowCompletion(ctx context.Context, id api.InstanceID, ...) (*backend.WorkflowMetadata, error)
- func (c *TaskHubGrpcClient) WaitForWorkflowStart(ctx context.Context, id api.InstanceID, ...) (*backend.WorkflowMetadata, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskHubGrpcClient ¶
type TaskHubGrpcClient struct {
// contains filtered or unexported fields
}
func NewTaskHubGrpcClient ¶
func NewTaskHubGrpcClient(cc grpc.ClientConnInterface, logger backend.Logger) *TaskHubGrpcClient
NewTaskHubGrpcClient creates a client that can be used to manage workflows over a gRPC connection. The gRPC connection must be to a task hub worker that understands the Durable Task gRPC protocol.
func (*TaskHubGrpcClient) FetchOrchestrationMetadata
deprecated
func (c *TaskHubGrpcClient) FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error)
Deprecated: Use FetchWorkflowMetadata instead.
func (*TaskHubGrpcClient) FetchWorkflowMetadata ¶ added in v0.12.0
func (c *TaskHubGrpcClient) FetchWorkflowMetadata(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error)
FetchWorkflowMetadata fetches metadata for the specified workflow from the configured task hub.
api.ErrInstanceNotFound is returned when the specified workflow doesn't exist.
func (*TaskHubGrpcClient) GetInstanceHistory ¶ added in v0.11.0
func (c *TaskHubGrpcClient) GetInstanceHistory(ctx context.Context, id api.InstanceID, opts ...api.GetInstanceHistoryOptions) (*backend.GetInstanceHistoryResponse, error)
func (*TaskHubGrpcClient) ListInstanceIDs ¶ added in v0.11.0
func (c *TaskHubGrpcClient) ListInstanceIDs(ctx context.Context, opts ...api.ListInstanceIDsOptions) (*backend.ListInstanceIDsResponse, error)
func (*TaskHubGrpcClient) PurgeOrchestrationState
deprecated
func (c *TaskHubGrpcClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error
Deprecated: Use PurgeWorkflowState instead.
func (*TaskHubGrpcClient) PurgeWorkflowState ¶ added in v0.12.0
func (c *TaskHubGrpcClient) PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error
PurgeWorkflowState deletes the state of the specified workflow instance.
api.ErrInstanceNotFound is returned if the specified workflow instance doesn't exist.
func (*TaskHubGrpcClient) RaiseEvent ¶
func (c *TaskHubGrpcClient) RaiseEvent(ctx context.Context, id api.InstanceID, eventName string, opts ...api.RaiseEventOptions) error
RaiseEvent sends an asynchronous event notification to a waiting workflow.
func (*TaskHubGrpcClient) RerunWorkflowFromEvent ¶ added in v0.7.0
func (c *TaskHubGrpcClient) RerunWorkflowFromEvent(ctx context.Context, id api.InstanceID, eventID uint32, opts ...api.RerunOptions) (api.InstanceID, error)
RerunWorkflowFromEvent reruns a workflow from a specific event ID of some source instance ID. If not given, a random new instance ID will be generated and returned. Can optionally give a new input to the target event ID to rerun from.
func (*TaskHubGrpcClient) ResumeOrchestration
deprecated
func (c *TaskHubGrpcClient) ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error
Deprecated: Use ResumeWorkflow instead.
func (*TaskHubGrpcClient) ResumeWorkflow ¶ added in v0.12.0
func (c *TaskHubGrpcClient) ResumeWorkflow(ctx context.Context, id api.InstanceID, reason string) error
ResumeWorkflow resumes a workflow instance that was previously suspended.
func (*TaskHubGrpcClient) ScheduleNewOrchestration
deprecated
func (c *TaskHubGrpcClient) ScheduleNewOrchestration(ctx context.Context, workflow string, opts ...api.NewWorkflowOptions) (api.InstanceID, error)
Deprecated: Use ScheduleNewWorkflow instead.
func (*TaskHubGrpcClient) ScheduleNewWorkflow ¶ added in v0.12.0
func (c *TaskHubGrpcClient) ScheduleNewWorkflow(ctx context.Context, workflow string, opts ...api.NewWorkflowOptions) (api.InstanceID, error)
ScheduleNewWorkflow schedules a new workflow instance with a specified set of options for execution.
func (*TaskHubGrpcClient) StartWorkItemListener ¶
func (c *TaskHubGrpcClient) StartWorkItemListener(ctx context.Context, r *task.TaskRegistry) error
func (*TaskHubGrpcClient) SuspendOrchestration
deprecated
func (c *TaskHubGrpcClient) SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error
Deprecated: Use SuspendWorkflow instead.
func (*TaskHubGrpcClient) SuspendWorkflow ¶ added in v0.12.0
func (c *TaskHubGrpcClient) SuspendWorkflow(ctx context.Context, id api.InstanceID, reason string) error
SuspendWorkflow suspends a workflow instance, halting processing of its events until a "resume" operation resumes it.
Note that suspended workflows are still considered to be "running" even though they will not process events.
func (*TaskHubGrpcClient) TerminateOrchestration
deprecated
func (c *TaskHubGrpcClient) TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error
Deprecated: Use TerminateWorkflow instead.
func (*TaskHubGrpcClient) TerminateWorkflow ¶ added in v0.12.0
func (c *TaskHubGrpcClient) TerminateWorkflow(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error
TerminateWorkflow terminates a running workflow by causing it to stop receiving new events and putting it directly into the TERMINATED state.
func (*TaskHubGrpcClient) WaitForOrchestrationCompletion
deprecated
func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error)
Deprecated: Use WaitForWorkflowCompletion instead.
func (*TaskHubGrpcClient) WaitForOrchestrationStart
deprecated
func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error)
Deprecated: Use WaitForWorkflowStart instead.
func (*TaskHubGrpcClient) WaitForWorkflowCompletion ¶ added in v0.12.0
func (c *TaskHubGrpcClient) WaitForWorkflowCompletion(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error)
WaitForWorkflowCompletion waits for a workflow to complete and returns an backend.WorkflowMetadata object that contains metadata about the completed instance.
api.ErrInstanceNotFound is returned when the specified workflow doesn't exist.
func (*TaskHubGrpcClient) WaitForWorkflowStart ¶ added in v0.12.0
func (c *TaskHubGrpcClient) WaitForWorkflowStart(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error)
WaitForWorkflowStart waits for a workflow to start running and returns an backend.WorkflowMetadata object that contains metadata about the started instance.
api.ErrInstanceNotFound is returned when the specified workflow doesn't exist.