Struct ServerGateway

Source
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: ServerGatewayOptions

Options gateway was initialized with

Trait Implementations§

Source§

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

Send a signal to a certain workflow instance

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,