chrony-confile 0.1.0

A full-featured Rust library for parsing, editing, validating, and serializing chrony configuration files
Documentation
//! Source selection tuning configuration types.
//!
//! These directives control how chrony selects the best time sources among available NTP peers,
//! including authentication mode, combine limits, distance/jitter constraints, and minimum
//! source counts.

/// Authentication selection mode for NTP sources.
///
/// Controls how chrony selects among sources with different authentication statuses.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AuthSelectMode {
    /// Require authenticated sources.
    Require,
    /// Prefer authenticated sources but accept unauthenticated ones.
    Prefer,
    /// Mix authenticated and unauthenticated sources.
    Mix,
    /// Ignore authentication status in source selection.
    Ignore,
}

#[derive(Debug, Clone, PartialEq)]
pub struct CombineLimitConfig { pub limit: f64 }

#[derive(Debug, Clone, PartialEq)]
pub struct MaxDistanceConfig { pub distance: f64 }

#[derive(Debug, Clone, PartialEq)]
pub struct MaxJitterConfig { pub jitter: f64 }

#[derive(Debug, Clone, PartialEq)]
pub struct MinSourcesConfig { pub sources: u32 }

#[derive(Debug, Clone, PartialEq)]
pub struct ReselectDistConfig { pub distance: f64 }

#[derive(Debug, Clone, PartialEq)]
pub struct StratumWeightConfig { pub distance: f64 }