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>,
    /* 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

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.

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> 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> 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