mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 16:46:55 +00:00
add server_info cpus net_info api
Signed-off-by: mujunxiang <1948535941@qq.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::health::NodeCommon;
|
||||
|
||||
pub mod net_linux;
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
pub struct NetInfo {
|
||||
node_common: NodeCommon,
|
||||
interface: String,
|
||||
driver: String,
|
||||
firmware_version: String,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
use super::NetInfo;
|
||||
|
||||
pub fn get_net_info(addr: &str, iface: &str) -> NetInfo {
|
||||
let mut ni = NetInfo::default();
|
||||
ni.node_common.addr = addr.to_string();
|
||||
ni.interface = iface.to_string();
|
||||
|
||||
ni
|
||||
}
|
||||
Reference in New Issue
Block a user