pub struct NetPulseConfig {
pub targets: Vec<String>,
pub interval_ms: u64,
pub timeout_ms: u64,
pub window_size: usize,
pub report_every: u64,
pub probe_type: ProbeType,
pub tcp_port: u16,
}Expand description
Top-level configuration for netpulse.
Fields§
§targets: Vec<String>Targets to monitor (IP addresses or host:port for TCP mode)
interval_ms: u64How often to send probes per target (milliseconds)
timeout_ms: u64Probe timeout (milliseconds)
window_size: usizeNumber of probe samples to keep in the ring buffer per target
report_every: u64How often to emit a stats summary (in probe cycles)
probe_type: ProbeTypeProbe type: “icmp” or “tcp”
tcp_port: u16Default TCP port for TCP probing
Implementations§
Source§impl NetPulseConfig
impl NetPulseConfig
Sourcepub fn from_file(path: &Path) -> Result<Self, NetPulseError>
pub fn from_file(path: &Path) -> Result<Self, NetPulseError>
Load config from a TOML file, returning defaults if file doesn’t exist.
Trait Implementations§
Source§impl Clone for NetPulseConfig
impl Clone for NetPulseConfig
Source§fn clone(&self) -> NetPulseConfig
fn clone(&self) -> NetPulseConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 NetPulseConfig
impl Debug for NetPulseConfig
Source§impl Default for NetPulseConfig
impl Default for NetPulseConfig
Source§impl<'de> Deserialize<'de> for NetPulseConfig
impl<'de> Deserialize<'de> for NetPulseConfig
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
Auto Trait Implementations§
impl Freeze for NetPulseConfig
impl RefUnwindSafe for NetPulseConfig
impl Send for NetPulseConfig
impl Sync for NetPulseConfig
impl Unpin for NetPulseConfig
impl UnsafeUnpin for NetPulseConfig
impl UnwindSafe for NetPulseConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more