Struct serf_rpc::Client[][src]

pub struct Client { /* fields omitted */ }

Implementations

impl Client[src]

pub fn fire_event<'a>(
    &'a self,
    name: &str,
    payload: &[u8],
    coalesce: bool
) -> RPCRequest<'a, ()>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Fire an event

impl Client[src]

pub fn force_leave<'a>(&'a self, node: &str) -> RPCRequest<'a, ()>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Force a node to leave

impl Client[src]

pub fn join<'a>(
    &'a self,
    existing: &[&str],
    replay: bool
) -> RPCRequest<'a, JoinResponse>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Join a serf cluster, given existing ip addresses. replay controls whether to replay old user events

impl Client[src]

pub fn members<'a>(&'a self) -> RPCRequest<'a, MembersResponse>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Returns a list of all known members

impl Client[src]

pub fn members_filtered<'a>(
    &'a self,
    status: Option<&str>,
    name: Option<&str>,
    tags: Option<&HashMap<String, String>>
) -> RPCRequest<'a, MembersResponse>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Returns a filtered list of all known members

impl Client[src]

pub fn tags<'a>(
    &'a self,
    add_tags: &[&str],
    delete_tags: &[&str]
) -> RPCRequest<'a, MembersResponse>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Modifies the tags of the current node

impl Client[src]

pub fn leave<'a>(&'a self) -> RPCRequest<'a, ()>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Gracefully leave

impl Client[src]

pub fn query_respond<'a>(
    &'a self,
    id: u64,
    payload: &[u8]
) -> RPCRequest<'a, ()>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Response to a query

impl Client[src]

pub fn get_coordinate<'a>(
    &'a self,
    node: &str
) -> RPCRequest<'a, CoordinateResponse>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Get a node's coordinate

impl Client[src]

pub fn stats<'a>(&'a self) -> RPCRequest<'a, AgentStats>

Notable traits for RPCRequest<'a, T>

impl<'a, T: RPCResponse> Future for RPCRequest<'a, T> type Output = Result<T, String>;
[src]

Get information about the Serf agent.

impl Client[src]

pub fn stream(self: &Arc<Self>, ty: &str) -> RPCStream<StreamMessage>[src]

impl Client[src]

pub async fn connect(
    rpc_addr: SocketAddr,
    auth_key: Option<&str>
) -> Result<Self, String>
[src]

Connect to hub.

Waits for handshake, and optionally for authentication if an auth key is provided.

pub async fn current_node_name(&self) -> Result<String, String>[src]

Trait Implementations

impl Clone for Client[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.