pub struct MetricDetailTransition {
pub previous_effective: i32,
pub effective: i32,
pub transition_kind: String,
pub client_id: Option<String>,
}Expand description
Worker-emitted cardinality-lease transition. Populates the
Event.metric_detail field when a worker’s effective level changes
because a lease was applied, renewed, expired (TTL janitor), or
cleared. The master folds these into the audit log alongside the
operator-initiated transitions emitted from
bin/src/command/requests.rs::worker_request, closing the gap where
worker-local expiries previously left no audit trail.
Fields§
§previous_effective: i32The worker’s effective cardinality level BEFORE the transition.
effective: i32The worker’s effective cardinality level AFTER the transition.
transition_kind: StringWhat caused the transition. Stable strings: “lease_tick_expired” (janitor retired one or more leases), “lease_apply” (worker arm applied a lease), “lease_clear” (worker arm cleared a lease). Operator-initiated apply/clear emit master-side; the worker still emits this Event so the SubscribeEvents bus has one canonical signal for cardinality changes regardless of origin.
client_id: Option<String>Operator-supplied lease key (SetMetricDetail.client_id) when the
transition was triggered by an explicit apply/clear. Empty for
janitor expiries, which clear many leases at once.
Implementations§
Source§impl MetricDetailTransition
impl MetricDetailTransition
Sourcepub fn previous_effective(&self) -> MetricDetail
pub fn previous_effective(&self) -> MetricDetail
Returns the enum value of previous_effective, or the default if the field is set to an invalid enum value.
Sourcepub fn set_previous_effective(&mut self, value: MetricDetail)
pub fn set_previous_effective(&mut self, value: MetricDetail)
Sets previous_effective to the provided enum value.
Sourcepub fn effective(&self) -> MetricDetail
pub fn effective(&self) -> MetricDetail
Returns the enum value of effective, or the default if the field is set to an invalid enum value.
Sourcepub fn set_effective(&mut self, value: MetricDetail)
pub fn set_effective(&mut self, value: MetricDetail)
Sets effective to the provided enum value.
Trait Implementations§
Source§impl Clone for MetricDetailTransition
impl Clone for MetricDetailTransition
Source§fn clone(&self) -> MetricDetailTransition
fn clone(&self) -> MetricDetailTransition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MetricDetailTransition
impl Debug for MetricDetailTransition
Source§impl Default for MetricDetailTransition
impl Default for MetricDetailTransition
Source§impl<'de> Deserialize<'de> for MetricDetailTransition
impl<'de> Deserialize<'de> for MetricDetailTransition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for MetricDetailTransition
impl Hash for MetricDetailTransition
Source§impl Message for MetricDetailTransition
impl Message for MetricDetailTransition
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 Ord for MetricDetailTransition
impl Ord for MetricDetailTransition
Source§fn cmp(&self, other: &MetricDetailTransition) -> Ordering
fn cmp(&self, other: &MetricDetailTransition) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MetricDetailTransition
impl PartialEq for MetricDetailTransition
Source§fn eq(&self, other: &MetricDetailTransition) -> bool
fn eq(&self, other: &MetricDetailTransition) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MetricDetailTransition
impl PartialOrd for MetricDetailTransition
Source§impl Serialize for MetricDetailTransition
impl Serialize for MetricDetailTransition
impl Eq for MetricDetailTransition
impl StructuralPartialEq for MetricDetailTransition
Auto Trait Implementations§
impl Freeze for MetricDetailTransition
impl RefUnwindSafe for MetricDetailTransition
impl Send for MetricDetailTransition
impl Sync for MetricDetailTransition
impl Unpin for MetricDetailTransition
impl UnsafeUnpin for MetricDetailTransition
impl UnwindSafe for MetricDetailTransition
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key and return true if they are equal.