blob: 713c5f803d4b4a25652a0383b6b4187115c3779f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
use shiplift::{Docker, ServiceListOptions};
#[tokio::main]
async fn main() {
env_logger::init();
let docker = Docker::new();
match docker
.services()
.list(&ServiceListOptions::builder().enable_status().build())
.await
{
Ok(services) => {
for s in services {
println!("service -> {:#?}", s)
}
}
Err(e) => eprintln!("Error: {}", e),
}
}
|