pub struct MasterClock {
pub timeline: u64,
pub master_ms: i64,
pub heard_sequence: u64,
pub wall_ms: i64,
pub lease_epoch: i64,
pub sequence: u64,
}Expand description
The master’s clock as a message left it (B225, B228). Master time is the leading master’s monotonic clock, one timeline per master process: every deadline the master and its workers must agree on is a master time, and no decision reads a wall clock.
Fields§
§timeline: u64The master process’s timeline: master times of different timelines aren’t compared.
master_ms: i64Master time, in milliseconds on that timeline.
heard_sequence: u64The latest WorkerClock.sequence the master had received on this worker’s stream when
it sent this (0: only its Register): that message was sent before this one, so the
worker reads master time from it, conservatively (B225, B240).
wall_ms: i64The master’s wall clock, Unix milliseconds: for a clock-skew warning only, never a deadline.
lease_epoch: i64The leader’s lease epoch, raised at each takeover (decision 444): a worker that has seen an epoch ends a stream from a lower one, a deposed master’s, and connects again. 0: no lease (a test’s master).
sequence: u64This message’s number on the stream: Registered is 1, then 2, 3, … (B240). The
worker’s messages name the latest it had handled (WorkerClock.heard_sequence).
Trait Implementations§
Source§impl Clone for MasterClock
impl Clone for MasterClock
Source§fn clone(&self) -> MasterClock
fn clone(&self) -> MasterClock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MasterClock
Source§impl Debug for MasterClock
impl Debug for MasterClock
Source§impl Default for MasterClock
impl Default for MasterClock
impl Eq for MasterClock
Source§impl Hash for MasterClock
impl Hash for MasterClock
Source§impl Message for MasterClock
impl Message for MasterClock
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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,
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,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self.Source§impl PartialEq for MasterClock
impl PartialEq for MasterClock
impl StructuralPartialEq for MasterClock
Auto Trait Implementations§
impl Freeze for MasterClock
impl RefUnwindSafe for MasterClock
impl Send for MasterClock
impl Sync for MasterClock
impl Unpin for MasterClock
impl UnsafeUnpin for MasterClock
impl UnwindSafe for MasterClock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].