wora 0.0.19

A framework for building applications (daemons, etc) that run in different environments (Linux, Kubernetes, etc).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use wora::o11y::{Host, HostInfo};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let h = Host::new()?;
    println!("{:?}", h.stats().cpu());

    let hi = HostInfo::new(h.sys())?;
    println!("{:?}", hi.os_type());
    #[cfg(target_os = "linux")]
    println!("{:?}", hi.current_process_tcp());
    #[cfg(target_os = "linux")]
    println!("{:?}", hi.current_process_udp());

    Ok(())
}