pub struct WatchDispatcher { /* private fields */ }Expand description
Watch dispatcher — distributes events to watchers (background task).
Spawned explicitly in NodeBuilder::build() to make resource allocation visible. Receives proto WatchResponse from the broadcast channel, converts to opaque WatchEvent per-watcher, and delivers via per-watcher mpsc channels.
Implementations§
Source§impl WatchDispatcher
impl WatchDispatcher
pub fn new( registry: Arc<WatchRegistry>, broadcast_rx: Receiver<WatchResponse>, unregister_rx: UnboundedReceiver<(u64, Bytes)>, last_applied: Arc<AtomicU64>, heartbeat_interval_ms: u64, ) -> Self
pub async fn run(self)
Auto Trait Implementations§
impl Freeze for WatchDispatcher
impl !RefUnwindSafe for WatchDispatcher
impl Send for WatchDispatcher
impl Sync for WatchDispatcher
impl Unpin for WatchDispatcher
impl UnsafeUnpin 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