pub struct ServerGateway {
pub service: WorkflowServiceClient<Channel>,
pub opts: ServerGatewayOptions,
}Expand description
Contains an instance of a client for interacting with the temporal server
Fields§
§service: WorkflowServiceClient<Channel>Client for interacting with workflow service
opts: ServerGatewayOptionsOptions gateway was initialized with
Trait Implementations§
Source§impl ServerGatewayApis for ServerGateway
impl ServerGatewayApis for ServerGateway
Source§fn start_workflow<'life0, 'async_trait>(
&'life0 self,
namespace: String,
task_queue: String,
workflow_id: String,
workflow_type: String,
) -> Pin<Box<dyn Future<Output = Result<StartWorkflowExecutionResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_workflow<'life0, 'async_trait>(
&'life0 self,
namespace: String,
task_queue: String,
workflow_id: String,
workflow_type: String,
) -> Pin<Box<dyn Future<Output = Result<StartWorkflowExecutionResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts workflow execution.
Source§fn poll_workflow_task<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollWorkflowTaskQueueResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn poll_workflow_task<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollWorkflowTaskQueueResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch new workflow tasks. Should block indefinitely if there is no work.
Source§fn poll_activity_task<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollActivityTaskQueueResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn poll_activity_task<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollActivityTaskQueueResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch new activity tasks. Should block indefinitely if there is no work.
Source§fn complete_workflow_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
commands: Vec<Command>,
) -> Pin<Box<dyn Future<Output = Result<RespondWorkflowTaskCompletedResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_workflow_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
commands: Vec<Command>,
) -> Pin<Box<dyn Future<Output = Result<RespondWorkflowTaskCompletedResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Complete a workflow activation.
task_token is the task token that would’ve been received
from crate::Core::poll_workflow_task API. commands is a list of new commands to send to
the server, such as starting a timer.Source§fn complete_activity_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
result: Option<Payloads>,
) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskCompletedResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_activity_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
result: Option<Payloads>,
) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskCompletedResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Complete activity task by sending response to the server.
task_token contains activity
identifier that would’ve been received from crate::Core::poll_activity_task API. result
is a blob that contains activity response.Source§fn record_activity_heartbeat<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
details: Option<Payloads>,
) -> Pin<Box<dyn Future<Output = Result<RecordActivityTaskHeartbeatResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_activity_heartbeat<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
details: Option<Payloads>,
) -> Pin<Box<dyn Future<Output = Result<RecordActivityTaskHeartbeatResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Report activity task heartbeat by sending details to the server.
task_token contains activity
identifier that would’ve been received from crate::Core::poll_activity_task API.
result contains cancel_requested flag, which if set to true indicates that activity has been cancelled.Source§fn cancel_activity_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
details: Option<Payloads>,
) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskCanceledResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_activity_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
details: Option<Payloads>,
) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskCanceledResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancel activity task by sending response to the server.
task_token contains activity
identifier that would’ve been received from crate::Core::poll_activity_task API. details
is a blob that provides arbitrary user defined cancellation info.Source§fn fail_activity_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
failure: Option<Failure>,
) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskFailedResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fail_activity_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
failure: Option<Failure>,
) -> Pin<Box<dyn Future<Output = Result<RespondActivityTaskFailedResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fail activity task by sending response to the server.
task_token contains activity
identifier that would’ve been received from crate::Core::poll_activity_task API. failure
provides failure details, such as message, cause and stack trace.Source§fn fail_workflow_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
cause: WorkflowTaskFailedCause,
failure: Option<Failure>,
) -> Pin<Box<dyn Future<Output = Result<RespondWorkflowTaskFailedResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fail_workflow_task<'life0, 'async_trait>(
&'life0 self,
task_token: Vec<u8>,
cause: WorkflowTaskFailedCause,
failure: Option<Failure>,
) -> Pin<Box<dyn Future<Output = Result<RespondWorkflowTaskFailedResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fail task by sending the failure to the server.
task_token is the task token that would’ve
been received from crate::Core::poll_workflow_task.Source§fn signal_workflow_execution<'life0, 'async_trait>(
&'life0 self,
workflow_id: String,
run_id: String,
signal_name: String,
payloads: Option<Payloads>,
) -> Pin<Box<dyn Future<Output = Result<SignalWorkflowExecutionResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn signal_workflow_execution<'life0, 'async_trait>(
&'life0 self,
workflow_id: String,
run_id: String,
signal_name: String,
payloads: Option<Payloads>,
) -> Pin<Box<dyn Future<Output = Result<SignalWorkflowExecutionResponse, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a signal to a certain workflow instance
Auto Trait Implementations§
impl Freeze for ServerGateway
impl !RefUnwindSafe for ServerGateway
impl Send for ServerGateway
impl Sync for ServerGateway
impl Unpin for ServerGateway
impl !UnwindSafe for ServerGateway
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request