pub struct EffectiveConfig {
pub target_version: Option<String>,
pub target_version_jitter: String,
pub inventory_interval: String,
pub inventory_jitter: String,
pub inventory_enabled: bool,
pub heartbeat_interval: String,
}Expand description
Concrete config the agent runs against once the scope stack has
been flattened. target_version stays Option because “no
rollout target set anywhere” is a meaningful state (the agent
just keeps running the version it has); the other fields always
have a value, falling back to EffectiveConfig::builtin_defaults
when no scope sets them.
Fields§
§target_version: Option<String>§target_version_jitter: String§inventory_interval: String§inventory_jitter: String§inventory_enabled: bool§heartbeat_interval: StringImplementations§
Source§impl EffectiveConfig
impl EffectiveConfig
Sourcepub fn builtin_defaults() -> Self
pub fn builtin_defaults() -> Self
Floor values used when no KV scope sets a given field. Mirrors the historic agent.toml defaults so unbootstrapped fleets keep behaving the way they did pre-Sprint 6.
Sourcepub fn heartbeat_duration(&self) -> Duration
pub fn heartbeat_duration(&self) -> Duration
Parsed heartbeat_interval, falling back to the built-in
30 s default on a malformed string. Logging the parse error
is the caller’s job (so that test code can stay quiet).
pub fn inventory_interval_duration(&self) -> Duration
pub fn inventory_jitter_duration(&self) -> Duration
Sourcepub fn target_version_jitter_duration(&self) -> Duration
pub fn target_version_jitter_duration(&self) -> Duration
Parsed target_version_jitter, falling back to zero (= no
jitter) on a malformed string. Zero means “start downloading
immediately when target_version drifts” — fine for small
fleets / canary smoke tests, bad for 3000 hosts.
Trait Implementations§
Source§impl Clone for EffectiveConfig
impl Clone for EffectiveConfig
Source§fn clone(&self) -> EffectiveConfig
fn clone(&self) -> EffectiveConfig
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 EffectiveConfig
impl Debug for EffectiveConfig
Source§impl Default for EffectiveConfig
impl Default for EffectiveConfig
Source§impl<'de> Deserialize<'de> for EffectiveConfig
impl<'de> Deserialize<'de> for EffectiveConfig
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 PartialEq for EffectiveConfig
impl PartialEq for EffectiveConfig
Source§fn eq(&self, other: &EffectiveConfig) -> bool
fn eq(&self, other: &EffectiveConfig) -> bool
self and other values to be equal, and is used by ==.