containers: Docker (and best-effort Podman) plugin

- minimal Docker Engine API client over Unix/TCP sockets with version
  negotiation and chunked response decoding
- drop-in stats schema: active/stopped containers, CPU/memory/IO/network
  rates, ports, uptime (pretty_date), image, engine field
- Docker + Podman engines, config (all, podman_sock, max_name_size,
  disable_stats, show/hide, per-container thresholds)
- export strips the computation sub-dicts (--stdout/--stdout-csv)
- TUI block above the process count
- CI-safe fake Docker socket test + live differential parity
This commit is contained in:
glances-rs
2026-10-10 00:24:39 +00:00
parent a522d21b0b
commit ea9debf71b
13 changed files with 2036 additions and 6 deletions
+3 -1
View File
@@ -117,7 +117,9 @@ pub fn render_stdout_json(engine: &Engine, plugins: &[String]) -> String {
continue;
};
if plugin.is_enabled() {
result.insert(name.clone(), plugin.export());
// Python stdout-json serializes the raw stats (not the export
// flavour used by --stdout/--stdout-csv).
result.insert(name.clone(), plugin.stats().clone());
}
}
serde_json::to_string(&Value::Object(result)).unwrap_or_else(|_| "{}".to_string())