pub struct SagaHandler<H>where
H: SagaDomainHandler + Clone + 'static,{ /* private fields */ }Expand description
gRPC saga service implementation.
Wraps a SagaRouter to handle saga events.
Implementations§
Source§impl<H: SagaDomainHandler + Clone + 'static> SagaHandler<H>
impl<H: SagaDomainHandler + Clone + 'static> SagaHandler<H>
Sourcepub fn new(router: SagaRouter<H>) -> Self
pub fn new(router: SagaRouter<H>) -> Self
Create a new saga handler from a router.
Sourcepub fn router(&self) -> &SagaRouter<H>
pub fn router(&self) -> &SagaRouter<H>
Get the underlying router.
Trait Implementations§
Source§impl<H: SagaDomainHandler + Clone + 'static> SagaService for SagaHandler<H>
impl<H: SagaDomainHandler + Clone + 'static> SagaService for SagaHandler<H>
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
request: Request<SagaHandleRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SagaResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
request: Request<SagaHandleRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SagaResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Translate source events into commands for target domains.
Commands use angzarr_deferred — framework stamps explicit sequences on delivery.
Auto Trait Implementations§
impl<H> Freeze for SagaHandler<H>
impl<H> !RefUnwindSafe for SagaHandler<H>
impl<H> Send for SagaHandler<H>
impl<H> Sync for SagaHandler<H>
impl<H> Unpin for SagaHandler<H>
impl<H> UnsafeUnpin for SagaHandler<H>
impl<H> !UnwindSafe for SagaHandler<H>
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> 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