Skip to main content

SimpleDiscovery

Struct SimpleDiscovery 

Source
pub struct SimpleDiscovery { /* private fields */ }

Implementations§

Source§

impl SimpleDiscovery

Source

pub fn renew_topic_lease(&mut self, name: &str, ttl: Duration) -> bool

Source

pub fn renew_service_lease(&mut self, name: &str, ttl: Duration) -> bool

Source

pub fn renew_mission_lease(&mut self, name: &str, ttl: Duration) -> bool

Source

pub fn renew_endpoint_lease(&mut self, name: &str, ttl: Duration) -> bool

Source

pub fn set_topic_health(&mut self, name: &str, healthy: bool) -> bool

Source

pub fn set_service_health(&mut self, name: &str, healthy: bool) -> bool

Source

pub fn set_mission_health(&mut self, name: &str, healthy: bool) -> bool

Source

pub fn set_endpoint_health(&mut self, name: &str, healthy: bool) -> bool

Source

pub fn prune_inactive(&mut self) -> DiscoveryPruneReport

Source

pub fn snapshot(&self) -> DiscoverySnapshot

Source§

impl SimpleDiscovery

Source§

impl SimpleDiscovery

Source

pub fn register_topic(&mut self, name: impl Into<String>)

Source

pub fn register_service(&mut self, name: impl Into<String>)

Source

pub fn register_mission(&mut self, name: impl Into<String>)

Source

pub fn register_topic_with_ttl( &mut self, name: impl Into<String>, ttl: Duration, )

Source

pub fn register_service_with_ttl( &mut self, name: impl Into<String>, ttl: Duration, )

Source

pub fn register_mission_with_ttl( &mut self, name: impl Into<String>, ttl: Duration, )

Source

pub fn add_labels(&mut self, key: impl Into<String>, labels: Vec<String>)

Source

pub fn register_endpoint(&mut self, name: impl Into<String>, endpoint: Endpoint)

Source

pub fn register_endpoint_with_ttl( &mut self, name: impl Into<String>, endpoint: Endpoint, ttl: Duration, )

Source

pub fn update_endpoint_labels( &mut self, name: &str, labels: Vec<String>, ) -> bool

Source

pub fn unregister_endpoint(&mut self, name: &str) -> bool

Source§

impl SimpleDiscovery

Source

pub fn dump_static_payload(&self) -> String

Dump current discovery state using static-discovery directives.

Source§

impl SimpleDiscovery

Source

pub fn load_static_payload(&mut self, payload: &str) -> Result<usize, String>

Load static discovery directives from an in-memory string payload.

Source

pub fn broadcast_static_payload_udp( &self, destination: &str, ) -> Result<usize, String>

Broadcast current static discovery payload over UDP in one datagram.

Source

pub fn receive_static_payload_udp( &mut self, bind_addr: &str, timeout: Duration, ) -> Result<usize, String>

Receive one UDP discovery payload and merge it into this registry.

Source

pub fn load_static_file( &mut self, path: impl AsRef<Path>, ) -> Result<usize, String>

Trait Implementations§

Source§

impl Default for SimpleDiscovery

Source§

fn default() -> SimpleDiscovery

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

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<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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.