MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / subscribe_ready

Method subscribe_ready

nodedb-cluster/src/raft_loop/loop_core.rs:336–338  ·  view source on GitHub ↗

Subscribe to the boot-time readiness signal. The returned receiver starts at `false` and flips to `true` exactly once, after the first [`super::tick::do_tick`] completes phase 4 (apply committed entries). Used by the host crate to gate client-facing listener startup until the metadata raft group has produced its first applied entry.

(&self)

Source from the content-addressed store, hash-verified

334 /// host crate to gate client-facing listener startup until the
335 /// metadata raft group has produced its first applied entry.
336 pub fn subscribe_ready(&self) -> tokio::sync::watch::Receiver<bool> {
337 self.ready_watch.subscribe()
338 }
339
340 /// Set a handler for incoming VShardEnvelope messages.
341 pub fn with_vshard_handler(mut self, handler: VShardEnvelopeHandler) -> Self {

Callers 1

start_raftFunction · 0.80

Calls 1

subscribeMethod · 0.45

Tested by

no test coverage detected