diff options
Diffstat (limited to 'src/container.rs')
-rw-r--r-- | src/container.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/container.rs b/src/container.rs index 24c41d6..f92811a 100644 --- a/src/container.rs +++ b/src/container.rs @@ -20,7 +20,7 @@ use crate::{ errors::{Error, Result}, exec::{Exec, ExecContainerOptions}, image::Config, - network::{NetworkInfo, NetworkSettings}, + network::NetworkSettings, transport::Payload, tty::{self, Multiplexer as TtyMultiPlexer}, }; @@ -1288,13 +1288,25 @@ pub struct Port { #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Stats { pub read: String, - pub networks: HashMap<String, NetworkInfo>, + pub networks: HashMap<String, NetworkStats>, pub memory_stats: MemoryStats, pub blkio_stats: BlkioStats, pub cpu_stats: CpuStats, } #[derive(Clone, Debug, Serialize, Deserialize)] +pub struct NetworkStats { + pub rx_dropped: u64, + pub rx_bytes: u64, + pub rx_errors: u64, + pub tx_packets: u64, + pub tx_dropped: u64, + pub rx_packets: u64, + pub tx_errors: u64, + pub tx_bytes: u64, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct MemoryStats { pub max_usage: u64, pub usage: u64, |