Struct etcd_client::ElectionClient [−][src]
#[repr(transparent)]pub struct ElectionClient { /* fields omitted */ }
Expand description
Client for Elect operations.
Implementations
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>
pub async fn proclaim(
&mut self,
value: impl Into<Vec<u8>>,
options: Option<ProclaimOptions>
) -> Result<ProclaimResponse, Error>
Lets the leader announce a new value without another election.
Returns the leader value for the current election.
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>
pub async fn resign(
&mut self,
option: Option<ResignOptions>
) -> Result<ResignResponse, Error>
Releases election leadership and then start a new election
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ElectionClient
impl Send for ElectionClient
impl Sync for ElectionClient
impl Unpin for ElectionClient
impl !UnwindSafe for ElectionClient
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more