pub struct DaemonRegisterRequest {
pub machine_id: Option<String>,
pub labels: BTreeMap<String, String>,
pub zenoh_listen_endpoint: Option<String>,
pub zenoh_loopback_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::zenoh_listen_endpoint(None) (both advertisement fields
are None), so the coordinator stops handing out a dead listener.
None when the reservation failed or the listener is loopback. Keep
loopback out of this field: 1.0.x coordinators forward it to every host.
zenoh_loopback_listen_endpoint: Option<String>Loopback listener, advertised separately so 1.0.x coordinators ignore it. New coordinators hand it only to peers on the coordinator’s host. Missing means no loopback advertisement, as in 1.0.x.
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 and Self::zenoh_loopback_listen_endpoint.
Loopback listeners are placed only in the latter field.
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).
pub fn check_version(&self) -> Result<(), String>
Trait Implementations§
Source§impl Debug for DaemonRegisterRequest
impl Debug for DaemonRegisterRequest
Source§impl<'de> Deserialize<'de> for DaemonRegisterRequest
impl<'de> Deserialize<'de> for DaemonRegisterRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DaemonRegisterRequest
impl RefUnwindSafe for DaemonRegisterRequest
impl Send for DaemonRegisterRequest
impl Sync for DaemonRegisterRequest
impl Unpin for DaemonRegisterRequest
impl UnsafeUnpin for DaemonRegisterRequest
impl UnwindSafe for DaemonRegisterRequest
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more