Struct temporal_sdk_core::protos::temporal::api::workflowservice::v1::workflow_service_client::WorkflowServiceClient[][src]

pub struct WorkflowServiceClient<T> { /* fields omitted */ }

WorkflowService API is exposed to provide support for long running applications. Application is expected to call StartWorkflowExecution to create an instance for each instance of long running workflow. Such applications are expected to have a worker which regularly polls for WorkflowTask and ActivityTask from the WorkflowService. For each WorkflowTask, application is expected to process the history of events for that session and respond back with next commands. For each ActivityTask, application is expected to execute the actual logic for that task and respond back with completion or failure. Worker is expected to regularly heartbeat while activity task is running.

Implementations

impl WorkflowServiceClient<Channel>[src]

pub async fn connect<D>(dst: D) -> Result<Self, Error> where
    D: TryInto<Endpoint>,
    D::Error: Into<StdError>, 
[src]

Attempt to create a new client by connecting to a given endpoint.

impl<T> WorkflowServiceClient<T> where
    T: GrpcService<BoxBody>,
    T::ResponseBody: Body + HttpBody + Send + 'static,
    T::Error: Into<StdError>,
    <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send
[src]

pub fn new(inner: T) -> Self[src]

pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self[src]

pub async fn register_namespace(
    &mut self,
    request: impl IntoRequest<RegisterNamespaceRequest>
) -> Result<Response<RegisterNamespaceResponse>, Status>
[src]

RegisterNamespace creates a new namespace which can be used as a container for all resources. Namespace is a top level entity within Temporal, used as a container for all resources like workflow executions, task queues, etc. Namespace acts as a sandbox and provides isolation for all resources within the namespace. All resources belongs to exactly one namespace.

pub async fn describe_namespace(
    &mut self,
    request: impl IntoRequest<DescribeNamespaceRequest>
) -> Result<Response<DescribeNamespaceResponse>, Status>
[src]

DescribeNamespace returns the information and configuration for a registered namespace.

pub async fn list_namespaces(
    &mut self,
    request: impl IntoRequest<ListNamespacesRequest>
) -> Result<Response<ListNamespacesResponse>, Status>
[src]

ListNamespaces returns the information and configuration for all namespaces.

pub async fn update_namespace(
    &mut self,
    request: impl IntoRequest<UpdateNamespaceRequest>
) -> Result<Response<UpdateNamespaceResponse>, Status>
[src]

(– api-linter: core::0134::method-signature=disabled aip.dev/not-precedent: UpdateNamespace RPC doesn’t follow Google API format. –) (– api-linter: core::0134::response-message-name=disabled aip.dev/not-precedent: UpdateNamespace RPC doesn’t follow Google API format. –) UpdateNamespace is used to update the information and configuration for a registered namespace.

pub async fn deprecate_namespace(
    &mut self,
    request: impl IntoRequest<DeprecateNamespaceRequest>
) -> Result<Response<DeprecateNamespaceResponse>, Status>
[src]

DeprecateNamespace is used to update state of a registered namespace to DEPRECATED. Once the namespace is deprecated it cannot be used to start new workflow executions. Existing workflow executions will continue to run on deprecated namespaces.

pub async fn start_workflow_execution(
    &mut self,
    request: impl IntoRequest<StartWorkflowExecutionRequest>
) -> Result<Response<StartWorkflowExecutionResponse>, Status>
[src]

StartWorkflowExecution starts a new long running workflow instance. It will create the instance with ‘WorkflowExecutionStarted’ event in history and also schedule the first WorkflowTask for the worker to make the first command for this instance. It will return ‘WorkflowExecutionAlreadyStartedFailure’, if an instance already exists with same workflowId.

pub async fn get_workflow_execution_history(
    &mut self,
    request: impl IntoRequest<GetWorkflowExecutionHistoryRequest>
) -> Result<Response<GetWorkflowExecutionHistoryResponse>, Status>
[src]

GetWorkflowExecutionHistory returns the history of specified workflow execution. It fails with ‘NotFoundFailure’ if specified workflow execution in unknown to the service.

pub async fn poll_workflow_task_queue(
    &mut self,
    request: impl IntoRequest<PollWorkflowTaskQueueRequest>
) -> Result<Response<PollWorkflowTaskQueueResponse>, Status>
[src]

PollWorkflowTaskQueue is called by application worker to process WorkflowTask from a specific task queue. A WorkflowTask is dispatched to callers for active workflow executions, with pending workflow tasks. Application is then expected to call ‘RespondWorkflowTaskCompleted’ API when it is done processing the WorkflowTask. It will also create a ‘WorkflowTaskStarted’ event in the history for that session before handing off WorkflowTask to application worker.

pub async fn respond_workflow_task_completed(
    &mut self,
    request: impl IntoRequest<RespondWorkflowTaskCompletedRequest>
) -> Result<Response<RespondWorkflowTaskCompletedResponse>, Status>
[src]

RespondWorkflowTaskCompleted is called by application worker to complete a WorkflowTask handed as a result of ‘PollWorkflowTaskQueue’ API call. Completing a WorkflowTask will result in new events for the workflow execution and potentially new ActivityTask being created for corresponding commands. It will also create a WorkflowTaskCompleted event in the history for that session. Use the ‘taskToken’ provided as response of PollWorkflowTaskQueue API call for completing the WorkflowTask. The response could contain a new workflow task if there is one or if the request asking for one.

pub async fn respond_workflow_task_failed(
    &mut self,
    request: impl IntoRequest<RespondWorkflowTaskFailedRequest>
) -> Result<Response<RespondWorkflowTaskFailedResponse>, Status>
[src]

RespondWorkflowTaskFailed is called by application worker to indicate failure. This results in WorkflowTaskFailedEvent written to the history and a new WorkflowTask created. This API can be used by client to either clear sticky task queue or report any panics during WorkflowTask processing. Temporal will only append first WorkflowTaskFailed event to the history of workflow execution for consecutive failures.

pub async fn poll_activity_task_queue(
    &mut self,
    request: impl IntoRequest<PollActivityTaskQueueRequest>
) -> Result<Response<PollActivityTaskQueueResponse>, Status>
[src]

PollActivityTaskQueue is called by application worker to process ActivityTask from a specific task queue. ActivityTask is dispatched to callers whenever a ScheduleTask command is made for a workflow execution. Application is expected to call ‘RespondActivityTaskCompleted’ or ‘RespondActivityTaskFailed’ once it is done processing the task. Application also needs to call ‘RecordActivityTaskHeartbeat’ API within ‘heartbeatTimeoutSeconds’ interval to prevent the task from getting timed out. An event ‘ActivityTaskStarted’ event is also written to workflow execution history before the ActivityTask is dispatched to application worker.

pub async fn record_activity_task_heartbeat(
    &mut self,
    request: impl IntoRequest<RecordActivityTaskHeartbeatRequest>
) -> Result<Response<RecordActivityTaskHeartbeatResponse>, Status>
[src]

RecordActivityTaskHeartbeat is called by application worker while it is processing an ActivityTask. If worker fails to heartbeat within ‘heartbeatTimeoutSeconds’ interval for the ActivityTask, then it will be marked as timedout and ‘ActivityTaskTimedOut’ event will be written to the workflow history. Calling ‘RecordActivityTaskHeartbeat’ will fail with ‘NotFoundFailure’ in such situations. Use the ‘taskToken’ provided as response of PollActivityTaskQueue API call for heart beating.

pub async fn record_activity_task_heartbeat_by_id(
    &mut self,
    request: impl IntoRequest<RecordActivityTaskHeartbeatByIdRequest>
) -> Result<Response<RecordActivityTaskHeartbeatByIdResponse>, Status>
[src]

(– api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: “By” is used to indicate request type. –) RecordActivityTaskHeartbeatById is called by application worker while it is processing an ActivityTask. If worker fails to heartbeat within ‘heartbeatTimeoutSeconds’ interval for the ActivityTask, then it will be marked as timed out and ‘ActivityTaskTimedOut’ event will be written to the workflow history. Calling ‘RecordActivityTaskHeartbeatById’ will fail with ‘NotFoundFailure’ in such situations. Instead of using ‘taskToken’ like in RecordActivityTaskHeartbeat, use Namespace, WorkflowId and ActivityId

pub async fn respond_activity_task_completed(
    &mut self,
    request: impl IntoRequest<RespondActivityTaskCompletedRequest>
) -> Result<Response<RespondActivityTaskCompletedResponse>, Status>
[src]

RespondActivityTaskCompleted is called by application worker when it is done processing an ActivityTask. It will result in a new ‘ActivityTaskCompleted’ event being written to the workflow history and a new WorkflowTask created for the workflow so new commands could be made. Use the ‘taskToken’ provided as response of PollActivityTaskQueue API call for completion. It fails with ‘NotFoundFailure’ if the taskToken is not valid anymore due to activity timeout.

pub async fn respond_activity_task_completed_by_id(
    &mut self,
    request: impl IntoRequest<RespondActivityTaskCompletedByIdRequest>
) -> Result<Response<RespondActivityTaskCompletedByIdResponse>, Status>
[src]

(– api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: “By” is used to indicate request type. –) RespondActivityTaskCompletedById is called by application worker when it is done processing an ActivityTask. It will result in a new ‘ActivityTaskCompleted’ event being written to the workflow history and a new WorkflowTask created for the workflow so new commands could be made. Similar to RespondActivityTaskCompleted but use Namespace, WorkflowId and ActivityId instead of ‘taskToken’ for completion. It fails with ‘NotFoundFailure’ if the these Ids are not valid anymore due to activity timeout.

pub async fn respond_activity_task_failed(
    &mut self,
    request: impl IntoRequest<RespondActivityTaskFailedRequest>
) -> Result<Response<RespondActivityTaskFailedResponse>, Status>
[src]

RespondActivityTaskFailed is called by application worker when it is done processing an ActivityTask. It will result in a new ‘ActivityTaskFailed’ event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Use the ‘taskToken’ provided as response of PollActivityTaskQueue API call for completion. It fails with ‘NotFoundFailure’ if the taskToken is not valid anymore due to activity timeout.

pub async fn respond_activity_task_failed_by_id(
    &mut self,
    request: impl IntoRequest<RespondActivityTaskFailedByIdRequest>
) -> Result<Response<RespondActivityTaskFailedByIdResponse>, Status>
[src]

(– api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: “By” is used to indicate request type. –) RespondActivityTaskFailedById is called by application worker when it is done processing an ActivityTask. It will result in a new ‘ActivityTaskFailed’ event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Similar to RespondActivityTaskFailed but use Namespace, WorkflowId and ActivityId instead of ‘taskToken’ for completion. It fails with ‘NotFoundFailure’ if the these Ids are not valid anymore due to activity timeout.

pub async fn respond_activity_task_canceled(
    &mut self,
    request: impl IntoRequest<RespondActivityTaskCanceledRequest>
) -> Result<Response<RespondActivityTaskCanceledResponse>, Status>
[src]

RespondActivityTaskCanceled is called by application worker when it is successfully canceled an ActivityTask. It will result in a new ‘ActivityTaskCanceled’ event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Use the ‘taskToken’ provided as response of PollActivityTaskQueue API call for completion. It fails with ‘NotFoundFailure’ if the taskToken is not valid anymore due to activity timeout.

pub async fn respond_activity_task_canceled_by_id(
    &mut self,
    request: impl IntoRequest<RespondActivityTaskCanceledByIdRequest>
) -> Result<Response<RespondActivityTaskCanceledByIdResponse>, Status>
[src]

(– api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: “By” is used to indicate request type. –) RespondActivityTaskCanceledById is called by application worker when it is successfully canceled an ActivityTask. It will result in a new ‘ActivityTaskCanceled’ event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Similar to RespondActivityTaskCanceled but use Namespace, WorkflowId and ActivityId instead of ‘taskToken’ for completion. It fails with ‘NotFoundFailure’ if the these Ids are not valid anymore due to activity timeout.

pub async fn request_cancel_workflow_execution(
    &mut self,
    request: impl IntoRequest<RequestCancelWorkflowExecutionRequest>
) -> Result<Response<RequestCancelWorkflowExecutionResponse>, Status>
[src]

RequestCancelWorkflowExecution is called by application worker when it wants to request cancellation of a workflow instance. It will result in a new ‘WorkflowExecutionCancelRequested’ event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. It fails with ‘NotFoundFailure’ if the workflow is not valid anymore due to completion or doesn’t exist.

pub async fn signal_workflow_execution(
    &mut self,
    request: impl IntoRequest<SignalWorkflowExecutionRequest>
) -> Result<Response<SignalWorkflowExecutionResponse>, Status>
[src]

SignalWorkflowExecution is used to send a signal event to running workflow execution. This results in WorkflowExecutionSignaled event recorded in the history and a workflow task being created for the execution.

pub async fn signal_with_start_workflow_execution(
    &mut self,
    request: impl IntoRequest<SignalWithStartWorkflowExecutionRequest>
) -> Result<Response<SignalWithStartWorkflowExecutionResponse>, Status>
[src]

(– api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: “With” is used to indicate combined operation. –) SignalWithStartWorkflowExecution is used to ensure sending signal to a workflow. If the workflow is running, this results in WorkflowExecutionSignaled event being recorded in the history and a workflow task being created for the execution. If the workflow is not running or not found, this results in WorkflowExecutionStarted and WorkflowExecutionSignaled events being recorded in history, and a workflow task being created for the execution

pub async fn reset_workflow_execution(
    &mut self,
    request: impl IntoRequest<ResetWorkflowExecutionRequest>
) -> Result<Response<ResetWorkflowExecutionResponse>, Status>
[src]

ResetWorkflowExecution reset an existing workflow execution to WorkflowTaskCompleted event(exclusive). And it will immediately terminating the current execution instance.

pub async fn terminate_workflow_execution(
    &mut self,
    request: impl IntoRequest<TerminateWorkflowExecutionRequest>
) -> Result<Response<TerminateWorkflowExecutionResponse>, Status>
[src]

TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event in the history and immediately terminating the execution instance.

pub async fn list_open_workflow_executions(
    &mut self,
    request: impl IntoRequest<ListOpenWorkflowExecutionsRequest>
) -> Result<Response<ListOpenWorkflowExecutionsResponse>, Status>
[src]

ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace.

pub async fn list_closed_workflow_executions(
    &mut self,
    request: impl IntoRequest<ListClosedWorkflowExecutionsRequest>
) -> Result<Response<ListClosedWorkflowExecutionsResponse>, Status>
[src]

ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace.

pub async fn list_workflow_executions(
    &mut self,
    request: impl IntoRequest<ListWorkflowExecutionsRequest>
) -> Result<Response<ListWorkflowExecutionsResponse>, Status>
[src]

ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.

pub async fn list_archived_workflow_executions(
    &mut self,
    request: impl IntoRequest<ListArchivedWorkflowExecutionsRequest>
) -> Result<Response<ListArchivedWorkflowExecutionsResponse>, Status>
[src]

ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.

pub async fn scan_workflow_executions(
    &mut self,
    request: impl IntoRequest<ScanWorkflowExecutionsRequest>
) -> Result<Response<ScanWorkflowExecutionsResponse>, Status>
[src]

ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific namespace without order.

pub async fn count_workflow_executions(
    &mut self,
    request: impl IntoRequest<CountWorkflowExecutionsRequest>
) -> Result<Response<CountWorkflowExecutionsResponse>, Status>
[src]

CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.

pub async fn get_search_attributes(
    &mut self,
    request: impl IntoRequest<GetSearchAttributesRequest>
) -> Result<Response<GetSearchAttributesResponse>, Status>
[src]

GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs

pub async fn respond_query_task_completed(
    &mut self,
    request: impl IntoRequest<RespondQueryTaskCompletedRequest>
) -> Result<Response<RespondQueryTaskCompletedResponse>, Status>
[src]

RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a WorkflowTask for query) as a result of ‘PollWorkflowTaskQueue’ API call. Completing a QueryTask will unblock the client call to ‘QueryWorkflow’ API and return the query result to client as a response to ‘QueryWorkflow’ API call.

pub async fn reset_sticky_task_queue(
    &mut self,
    request: impl IntoRequest<ResetStickyTaskQueueRequest>
) -> Result<Response<ResetStickyTaskQueueResponse>, Status>
[src]

ResetStickyTaskQueue resets the sticky task queue related information in mutable state of a given workflow. Things cleared are:

  1. StickyTaskQueue
  2. StickyScheduleToStartTimeout

pub async fn query_workflow(
    &mut self,
    request: impl IntoRequest<QueryWorkflowRequest>
) -> Result<Response<QueryWorkflowResponse>, Status>
[src]

QueryWorkflow returns query result for a specified workflow execution

pub async fn describe_workflow_execution(
    &mut self,
    request: impl IntoRequest<DescribeWorkflowExecutionRequest>
) -> Result<Response<DescribeWorkflowExecutionResponse>, Status>
[src]

DescribeWorkflowExecution returns information about the specified workflow execution.

pub async fn describe_task_queue(
    &mut self,
    request: impl IntoRequest<DescribeTaskQueueRequest>
) -> Result<Response<DescribeTaskQueueResponse>, Status>
[src]

DescribeTaskQueue returns information about the target task queue, right now this API returns the pollers which polled this task queue in last few minutes.

pub async fn get_cluster_info(
    &mut self,
    request: impl IntoRequest<GetClusterInfoRequest>
) -> Result<Response<GetClusterInfoResponse>, Status>
[src]

GetClusterInfo returns information about temporal cluster

pub async fn list_task_queue_partitions(
    &mut self,
    request: impl IntoRequest<ListTaskQueuePartitionsRequest>
) -> Result<Response<ListTaskQueuePartitionsResponse>, Status>
[src]

Trait Implementations

impl<T: Clone> Clone for WorkflowServiceClient<T>[src]

impl<T> Debug for WorkflowServiceClient<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for WorkflowServiceClient<T>

impl<T> Send for WorkflowServiceClient<T> where
    T: Send

impl<T> Sync for WorkflowServiceClient<T> where
    T: Sync

impl<T> Unpin for WorkflowServiceClient<T> where
    T: Unpin

impl<T> !UnwindSafe for WorkflowServiceClient<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]