Skip to main content

rigtop_core/
lib.rs

1//! Data collection core shared by the rigtop TUI and GUI.
2//!
3//! - [`snapshot`]: the serializable measurement types exchanged between data
4//!   sources and front-ends (also the wire format for remote monitoring).
5//! - [`source`]: the [`DataSource`] trait and the [`LocalSource`] implementation.
6//! - [`config`]: user configuration (sensor labels, SMART directory).
7//! - [`system`], [`gpu`], [`smart`], `linux`: the individual collectors;
8//!   [`fill`]: when filesystems will be full; [`nut`]: UPSes, from Network
9//!   UPS Tools.
10//! - [`agent`], [`remote`]: remote monitoring over SSH (`rigtop --agent` and
11//!   the [`remote::RemoteSource`] that talks to it).
12//! - [`demo`]: made-up hosts for trying the interface (`--demo`).
13//! - [`snooze`]: alerts silenced for a while, shared by the front-ends.
14//! - [`worker`], [`view`], [`format`]: front-end helpers shared by the TUI
15//!   and the GUI (background polling thread, process table logic, units).
16
17pub mod agent;
18pub mod config;
19pub mod demo;
20pub mod fill;
21pub mod format;
22pub mod gpu;
23pub mod hosts;
24// Parsed (and tested) everywhere, used on Windows.
25#[cfg(any(windows, test))]
26mod lhm;
27#[cfg(target_os = "linux")]
28pub mod linux;
29pub mod nut;
30pub mod public_ip;
31pub mod remote;
32pub mod smart;
33pub mod snapshot;
34pub mod snooze;
35pub mod source;
36pub mod system;
37pub mod update;
38pub mod view;
39pub mod widget;
40#[cfg(windows)]
41mod windows;
42pub mod worker;
43
44pub use config::Config;
45pub use snapshot::Snapshot;
46pub use source::{DataSource, LocalSource, MIN_POLL_INTERVAL, ProcessSignal, SourceError};