pub struct BrokerService { /* private fields */ }Implementations§
Source§impl BrokerService
impl BrokerService
pub fn new(engine: Arc<BrokerEngine>, config: ServerConfig) -> Self
Trait Implementations§
Source§impl Broker for BrokerService
impl Broker for BrokerService
Source§type SubscribeStream = ReceiverStream<Result<EventEnvelope, Status>>
type SubscribeStream = ReceiverStream<Result<EventEnvelope, Status>>
Server streaming response type for the Subscribe method.
Source§type SubscribeDurableStream = ReceiverStream<Result<DurableServerMessage, Status>>
type SubscribeDurableStream = ReceiverStream<Result<DurableServerMessage, Status>>
Server streaming response type for the SubscribeDurable method.
Source§fn publish<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<EventEnvelope>>,
) -> Pin<Box<dyn Future<Output = Result<Response<PublishAck>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn publish<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<EventEnvelope>>,
) -> Pin<Box<dyn Future<Output = Result<Response<PublishAck>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fire-and-forget: client-streaming publish, ack at stream close
Source§fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fire-and-forget: server-streaming subscription
Source§fn publish_durable<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<EventEnvelope>>,
) -> Pin<Box<dyn Future<Output = Result<Response<PublishDurableAck>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn publish_durable<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<EventEnvelope>>,
) -> Pin<Box<dyn Future<Output = Result<Response<PublishDurableAck>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Durable: persist before ack
Source§fn subscribe_durable<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DurableClientMessage>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeDurableStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_durable<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DurableClientMessage>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeDurableStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Durable: bidirectional stream with explicit ack/nack
Auto Trait Implementations§
impl Freeze for BrokerService
impl !RefUnwindSafe for BrokerService
impl Send for BrokerService
impl Sync for BrokerService
impl Unpin for BrokerService
impl UnsafeUnpin for BrokerService
impl !UnwindSafe for BrokerService
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