Skip to main content

DaemonRegisterRequest

Struct DaemonRegisterRequest 

Source
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

Source

pub fn new(machine_id: Option<String>, labels: BTreeMap<String, String>) -> Self

Source

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.

Source

pub fn supports_hub_sources(&self) -> bool

Whether the registering daemon can build/spawn hub-sourced git nodes (carrying subdir / hub provenance).

Source

pub fn check_version(&self) -> Result<(), String>

Trait Implementations§

Source§

impl Debug for DaemonRegisterRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DaemonRegisterRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for DaemonRegisterRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsNode<T> for T

Source§

fn as_node(&self) -> &T

Source§

impl<T> AsNodeMut<T> for T

Source§

fn as_node_mut(&mut self) -> &mut T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V