pub struct WatchDispatcher { /* private fields */ }Expand description
Watch dispatcher - distributes events to watchers (background task)
This is spawned explicitly in NodeBuilder::build() to make resource allocation visible. It continuously:
- Receives events from broadcast channel
- Matches keys in the registry
- Dispatches to matching watchers
Implementations§
Source§impl WatchDispatcher
impl WatchDispatcher
Sourcepub fn new(
registry: Arc<WatchRegistry>,
broadcast_rx: Receiver<WatchEvent>,
unregister_rx: UnboundedReceiver<(u64, Bytes)>,
) -> Self
pub fn new( registry: Arc<WatchRegistry>, broadcast_rx: Receiver<WatchEvent>, unregister_rx: UnboundedReceiver<(u64, Bytes)>, ) -> Self
Create a new watch dispatcher
§Arguments
registry- Shared registry for looking up watchersbroadcast_rx- Receiver for watch events from StateMachineunregister_rx- Receiver for unregister requests from WatcherHandles
Auto Trait Implementations§
impl Freeze for WatchDispatcher
impl !RefUnwindSafe for WatchDispatcher
impl Send for WatchDispatcher
impl Sync for WatchDispatcher
impl Unpin for WatchDispatcher
impl !UnwindSafe for WatchDispatcher
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