pub struct StepDownActiveNodeRequest {
pub expected_node_epoch: Option<u64>,
pub expected_node_id: Option<String>,
}Expand description
Requests a step down of the active Server process that receives the call.
Fields§
§expected_node_epoch: Option<u64>When set, the process steps down only if it holds the node lease at this node epoch. Otherwise the call fails with FailedPrecondition and changes nothing. When unset, the node epoch is not checked.
expected_node_id: Option<String>When set, the process steps down only if it serves this node ID. Otherwise the call fails with FailedPrecondition and changes nothing. It keeps a call sent to the wrong server from matching another node’s epoch. When unset, the node ID is not checked. Set but empty is InvalidArgument.
Implementations§
Source§impl StepDownActiveNodeRequest
impl StepDownActiveNodeRequest
Sourcepub fn expected_node_epoch(&self) -> u64
pub fn expected_node_epoch(&self) -> u64
Returns the value of expected_node_epoch, or the default value if expected_node_epoch is unset.
Sourcepub fn expected_node_id(&self) -> &str
pub fn expected_node_id(&self) -> &str
Returns the value of expected_node_id, or the default value if expected_node_id is unset.
Trait Implementations§
Source§impl Clone for StepDownActiveNodeRequest
impl Clone for StepDownActiveNodeRequest
Source§impl Debug for StepDownActiveNodeRequest
impl Debug for StepDownActiveNodeRequest
Source§impl Default for StepDownActiveNodeRequest
impl Default for StepDownActiveNodeRequest
impl Eq for StepDownActiveNodeRequest
Source§impl Hash for StepDownActiveNodeRequest
impl Hash for StepDownActiveNodeRequest
Source§impl Message for StepDownActiveNodeRequest
impl Message for StepDownActiveNodeRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for StepDownActiveNodeRequest
Auto Trait Implementations§
impl Forget for StepDownActiveNodeRequest
impl Freeze for StepDownActiveNodeRequest
impl RefUnwindSafe for StepDownActiveNodeRequest
impl Send for StepDownActiveNodeRequest
impl Sync for StepDownActiveNodeRequest
impl Unpin for StepDownActiveNodeRequest
impl UnsafeUnpin for StepDownActiveNodeRequest
impl UnwindSafe for StepDownActiveNodeRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request