Skip to content

Latest commit

 

History

History
 
 

client

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

containerd GRPC client

Crates.io docs.rs Crates.io CI

This crate implements a GRPC client to query containerd APIs.

Example

Run with cargo run --example version

use containerd_client::{connect, services::v1::version_client::VersionClient};

async fn query_version() {
    // Launch containerd at /run/containerd/containerd.sock
    let channel = connect("/run/containerd/containerd.sock").await.unwrap();

    let mut client = VersionClient::new(channel);
    let resp = client.version(()).await.unwrap();

    println!("Response: {:?}", resp.get_ref());
}