summaryrefslogtreecommitdiffstats
path: root/examples/serviceinspect.rs
blob: c2816326b3e571e0669b11c6d6f4e44dbc440782 (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 serviceinspect -- <service>");

    match docker.services().get(&id).inspect().await {
        Ok(service) => println!("{:#?}", service),
        Err(e) => eprintln!("Error: {}", e),
    }
}