pub struct WsConsumer { /* private fields */ }Implementations§
Source§impl WsConsumer
impl WsConsumer
pub fn new(cfg: WsServerConfig, runtime: Arc<dyn RuntimeObservability>) -> Self
Trait Implementations§
Source§impl Consumer for WsConsumer
impl Consumer for WsConsumer
Source§fn start<'life0, 'async_trait>(
&'life0 mut self,
ctx: ConsumerContext,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 mut self,
ctx: ConsumerContext,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start consuming messages, sending them through the provided context.
Source§fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop consuming messages and clean up all resources. Read more
Source§fn concurrency_model(&self) -> ConcurrencyModel
fn concurrency_model(&self) -> ConcurrencyModel
Declares this consumer’s natural concurrency model. Read more
Source§fn background_task_handle(
&mut self,
) -> Option<JoinHandle<Result<(), CamelError>>>
fn background_task_handle( &mut self, ) -> Option<JoinHandle<Result<(), CamelError>>>
Return a handle to the consumer’s long-running background task so the
runtime can monitor it for unexpected exits after
start() returns Ok. Read moreSource§fn set_security_context(&mut self, ctx: SecurityContext)
fn set_security_context(&mut self, ctx: SecurityContext)
Set the security context for this consumer. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for WsConsumer
impl !UnwindSafe for WsConsumer
impl Freeze for WsConsumer
impl Send for WsConsumer
impl Sync for WsConsumer
impl Unpin for WsConsumer
impl UnsafeUnpin for WsConsumer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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> 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