teaql_provider_linux/collector/mod.rs
1mod process;
2mod system_info;
3mod thread;
4
5pub use process::ProcessCollector;
6pub use system_info::SystemInfoCollector;
7pub use thread::ThreadCollector;
8
9use teaql_core::Record;
10
11use crate::error::LinuxProviderError;
12
13/// A collector gathers records from a Linux subsystem (e.g. /proc).
14pub trait Collector: Send + Sync {
15 /// The entity name this collector produces (e.g. "SystemInfo", "Process").
16 fn entity_name(&self) -> &str;
17
18 /// Collect all records from the underlying data source.
19 fn collect_all(&self) -> Result<Vec<Record>, LinuxProviderError>;
20}