#[repr(u8)]pub enum CollectorTransport {
Dbus = 0,
Varlink = 1,
}Expand description
Which API transport served a collector on the last run.
Recorded per enabled collector so operators can watch varlink adoption
climb as the fleet’s systemd upgrades past each endpoint’s minimum
version: a collector reports Varlink when its varlink attempt succeeded
and Dbus when it collected the legacy way — either because varlink is
disabled in config or because the varlink attempt failed and fell back.
Dbus also covers the file-based networkd fallback: the value answers
“did this collector use varlink”, not “which fallback served it”.
Collectors with no varlink path (pid1, dbus_stats) and disabled
collectors stay None and emit no gauge, so the present gauges are
exactly the enabled set — no separate enabled-collectors counter needed.
Variants§
Implementations§
Source§impl CollectorTransport
impl CollectorTransport
Sourcepub fn as_u64(self) -> u64
pub fn as_u64(self) -> u64
Gauge value for flat JSON and metric exporters: 1 when varlink served the collector, 0 for the D-Bus/file fallback.
The repr(u8) discriminants are the gauge values, so every output
format (json, json-pretty, json-flat) reports the same integer —
matching the other stat enums (SystemdSystemState, the unit state
enums) rather than serializing as a string in some formats.
Trait Implementations§
Source§impl Clone for CollectorTransport
impl Clone for CollectorTransport
Source§fn clone(&self) -> CollectorTransport
fn clone(&self) -> CollectorTransport
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 CollectorTransport
Source§impl Debug for CollectorTransport
impl Debug for CollectorTransport
Source§impl Default for CollectorTransport
impl Default for CollectorTransport
Source§fn default() -> CollectorTransport
fn default() -> CollectorTransport
Source§impl<'de> Deserialize<'de> for CollectorTransport
impl<'de> Deserialize<'de> for CollectorTransport
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>,
impl Eq for CollectorTransport
Source§impl PartialEq for CollectorTransport
impl PartialEq for CollectorTransport
Source§fn eq(&self, other: &CollectorTransport) -> bool
fn eq(&self, other: &CollectorTransport) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CollectorTransport
impl Serialize for CollectorTransport
impl StructuralPartialEq for CollectorTransport
Auto Trait Implementations§
impl Freeze for CollectorTransport
impl RefUnwindSafe for CollectorTransport
impl Send for CollectorTransport
impl Sync for CollectorTransport
impl Unpin for CollectorTransport
impl UnsafeUnpin for CollectorTransport
impl UnwindSafe for CollectorTransport
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
§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.