[][src]Struct latticeclient::Client

pub struct Client { /* fields omitted */ }

A client for interacting with the lattice

Implementations

impl Client[src]

pub fn new(
    host: &str,
    credsfile: Option<PathBuf>,
    call_timeout: Duration
) -> Self
[src]

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]

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]

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]

Retrieves the list of all capabilities within the lattice (discovery limited by the client timeout period)

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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