[−][src]Struct latticeclient::Client
A client for interacting with the lattice
Implementations
impl Client
[src]
pub fn new(
host: &str,
credsfile: Option<PathBuf>,
call_timeout: Duration
) -> Self
[src]
host: &str,
credsfile: Option<PathBuf>,
call_timeout: Duration
) -> Self
Creates a new lattice client, connecting to the NATS server at the given host with an optional set of credentials (JWT auth)
pub fn get_hosts(&self) -> Result<Vec<HostProfile>, Box<dyn Error>>
[src]
Retrieves the list of all hosts running within the lattice. If it takes a host longer than the call timeout period to reply to the probe, it will not be included in the list of hosts.
pub fn get_bindings(
&self
) -> Result<HashMap<String, Vec<Binding>>, Box<dyn Error>>
[src]
&self
) -> Result<HashMap<String, Vec<Binding>>, Box<dyn Error>>
Retrieves a list of all bindings from actors to capabilities within the lattice (provided the host responds to the probe within the client timeout period)
pub fn get_actors(
&self
) -> Result<HashMap<String, Vec<Claims<Actor>>>, Box<dyn Error>>
[src]
&self
) -> Result<HashMap<String, Vec<Claims<Actor>>>, Box<dyn Error>>
Retrieves the list of all actors currently running within the lattice (as discovered within the client timeout period)
pub fn get_capabilities(
&self
) -> Result<HashMap<String, Vec<HostedCapability>>, Box<dyn Error>>
[src]
&self
) -> Result<HashMap<String, Vec<HostedCapability>>, Box<dyn Error>>
Retrieves the list of all capabilities within the lattice (discovery limited by the client timeout period)
pub fn watch_events(
&self,
sender: Sender<BusEvent>
) -> Result<(), Box<dyn Error>>
[src]
&self,
sender: Sender<BusEvent>
) -> Result<(), Box<dyn Error>>
Watches the lattice for bus events. This will create a subscription in a background thread, so callers are responsible for ensuring their process remains alive however long is appropriate. Pass the sender half of a channel to receive the events
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,