pub struct EffectiveConfig {
pub target_version: Option<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>§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
Trait Implementations§
Source§impl Clone for EffectiveConfig
impl Clone for EffectiveConfig
Source§fn clone(&self) -> EffectiveConfig
fn clone(&self) -> EffectiveConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EffectiveConfig
impl PartialEq for EffectiveConfig
Source§fn eq(&self, other: &EffectiveConfig) -> bool
fn eq(&self, other: &EffectiveConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EffectiveConfig
impl Serialize for EffectiveConfig
impl Eq for EffectiveConfig
impl StructuralPartialEq for EffectiveConfig
Auto Trait Implementations§
impl Freeze for EffectiveConfig
impl RefUnwindSafe for EffectiveConfig
impl Send for EffectiveConfig
impl Sync for EffectiveConfig
impl Unpin for EffectiveConfig
impl UnsafeUnpin for EffectiveConfig
impl UnwindSafe for EffectiveConfig
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