pub struct SlotManager { /* private fields */ }
Expand description
Enables local workers to make themselves visible to a shared client instance. There can only be one worker registered per namespace+queue_name+client, others will get ignored. It also provides a convenient method to find compatible slots within the collection.
Implementations§
Source§impl SlotManager
impl SlotManager
Sourcepub fn register(
&self,
provider: Box<dyn SlotProvider + Send + Sync>,
) -> Option<WorkerKey>
pub fn register( &self, provider: Box<dyn SlotProvider + Send + Sync>, ) -> Option<WorkerKey>
Register a local worker that can provide WFT processing slots.
Sourcepub fn unregister(
&self,
id: WorkerKey,
) -> Option<Box<dyn SlotProvider + Send + Sync>>
pub fn unregister( &self, id: WorkerKey, ) -> Option<Box<dyn SlotProvider + Send + Sync>>
Unregister a provider, typically when its worker starts shutdown.
Trait Implementations§
Source§impl Debug for SlotManager
impl Debug for SlotManager
Source§impl Default for SlotManager
impl Default for SlotManager
Source§fn default() -> SlotManager
fn default() -> SlotManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SlotManager
impl !RefUnwindSafe for SlotManager
impl Send for SlotManager
impl Sync for SlotManager
impl Unpin for SlotManager
impl !UnwindSafe for SlotManager
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