blob: 39e8ea6b7ab7030fb235a0368f363c81418d9ac3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
use shiplift::Docker;
use std::env;
#[tokio::main]
async fn main() {
let docker = Docker::new();
let id = env::args()
.nth(1)
.expect("Usage: cargo run --example top -- <container>");
match docker.containers().get(&id).top(Default::default()).await {
Ok(top) => println!("{:#?}", top),
Err(e) => eprintln!("Error: {}", e),
}
}
|