rust-extensions/crates/client
Bryant Biggs ab17df086a chore: Fix whitespace 2024-07-30 16:54:34 +00:00
..
examples chore: Fix whitespace 2024-07-30 16:54:34 +00:00
src Typos 2024-06-17 20:20:51 +00:00
vendor chore: Fix whitespace 2024-07-30 16:54:34 +00:00
Cargo.toml Enable type names for Protocol Buffer message types to support Any decoding. 2024-04-26 18:30:24 +00:00
README.md Add support for windows to containerd client 2024-04-24 22:31:39 +00:00
build.rs Enable type names for Protocol Buffer message types to support Any decoding. 2024-04-26 18:30:24 +00:00
rsync.txt Add update vendor script 2024-02-22 17:49:39 +00:00

README.md

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());
}