pub struct DaemonRegisterRequest {
pub machine_id: Option<String>,
pub labels: BTreeMap<String, String>,
pub zenoh_listen_endpoint: Option<String>,
/* private fields */
}Fields§
§machine_id: Option<String>§labels: BTreeMap<String, String>§zenoh_listen_endpoint: Option<String>The zenoh endpoint this daemon is about to bind, so the coordinator can hand it to daemons that register after this one.
Carried in the registration rather than reported once the session is
open, and that timing is the whole point. The coordinator handles
registrations one at a time on its event loop, so an endpoint that
arrives with the registration is already on record before the next
daemon’s reply is built — two daemons starting simultaneously are
ordered by that loop and the later one always learns about the earlier.
Reporting after the session opened instead left a window (register →
listener bound) in which both daemons could register, each be handed a
list without the other, and stay partitioned: zenoh reads
connect/endpoints once at session open, so neither could act on the
other’s later report.
The port is reserved before registering, so this is the endpoint the
daemon will bind rather than one it has bound. A bind that then fails
verification is withdrawn with
DaemonEvent::ZenohListenEndpoint(None), so the coordinator never
keeps handing out an endpoint with nothing behind it for long.
None for a daemon with no dialable listener — a single-machine
deployment (loopback, which would point a remote peer at its own host)
or a failed reservation.
Implementations§
Source§impl DaemonRegisterRequest
impl DaemonRegisterRequest
pub fn new(machine_id: Option<String>, labels: BTreeMap<String, String>) -> Self
Sourcepub fn with_zenoh_endpoint(
machine_id: Option<String>,
labels: BTreeMap<String, String>,
zenoh_listen_endpoint: Option<String>,
) -> Self
pub fn with_zenoh_endpoint( machine_id: Option<String>, labels: BTreeMap<String, String>, zenoh_listen_endpoint: Option<String>, ) -> Self
Self::new plus the zenoh endpoint this daemon will bind; see
Self::zenoh_listen_endpoint.
Sourcepub fn supports_hub_sources(&self) -> bool
pub fn supports_hub_sources(&self) -> bool
Whether the registering daemon can build/spawn hub-sourced git nodes
(carrying subdir / hub provenance).