Struct etcd_client::ElectionClient [−][src]
#[repr(transparent)]pub struct ElectionClient { /* fields omitted */ }
Client for Elect operations.
Implementations
impl ElectionClient[src]
impl ElectionClient[src]pub async fn campaign(
&mut self,
name: impl Into<Vec<u8>>,
value: impl Into<Vec<u8>>,
lease: i64
) -> Result<CampaignResponse, Error>[src]
&mut self,
name: impl Into<Vec<u8>>,
value: impl Into<Vec<u8>>,
lease: i64
) -> Result<CampaignResponse, Error>
Puts a value as eligible for the election on the prefix key. Multiple sessions can participate in the election for the same prefix, but only one can be the leader at a time.
pub async fn proclaim(
&mut self,
value: impl Into<Vec<u8>>,
options: Option<ProclaimOptions>
) -> Result<ProclaimResponse, Error>[src]
&mut self,
value: impl Into<Vec<u8>>,
options: Option<ProclaimOptions>
) -> Result<ProclaimResponse, Error>
Lets the leader announce a new value without another election.
pub async fn leader(
&mut self,
name: impl Into<Vec<u8>>
) -> Result<LeaderResponse, Error>[src]
&mut self,
name: impl Into<Vec<u8>>
) -> Result<LeaderResponse, Error>
Returns the leader value for the current election.
pub async fn observe(
&mut self,
name: impl Into<Vec<u8>>
) -> Result<ObserveStream, Error>[src]
&mut self,
name: impl Into<Vec<u8>>
) -> Result<ObserveStream, Error>
Returns a channel that reliably observes ordered leader proposals as GetResponse values on every current elected leader key.
pub async fn resign(
&mut self,
option: Option<ResignOptions>
) -> Result<ResignResponse, Error>[src]
&mut self,
option: Option<ResignOptions>
) -> Result<ResignResponse, Error>
Releases election leadership and then start a new election
Trait Implementations
impl Clone for ElectionClient[src]
impl Clone for ElectionClient[src]fn clone(&self) -> ElectionClient[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for ElectionClient
impl !RefUnwindSafe for ElectionClientimpl Send for ElectionClient
impl Send for ElectionClientimpl Sync for ElectionClient
impl Sync for ElectionClientimpl Unpin for ElectionClient
impl Unpin for ElectionClientimpl !UnwindSafe for ElectionClient
impl !UnwindSafe for ElectionClientBlanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> IntoRequest<T> for T[src]
impl<T> IntoRequest<T> for T[src]pub fn into_request(self) -> Request<T>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, pub fn vzip(self) -> V
impl<T> WithSubscriber for T[src]
impl<T> WithSubscriber for T[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>, [src]
S: Into<Dispatch>,