Shim protos and client for containerd
Deprecated: Use containerd-shim-protos instead.
TTRPC bindings for containerd's shim events and interfaces.
Design
The containerd-shim-client
crate provides Protobuf message
and ttRPC service definitions for the
Containerd shim v2 protocol.
The message and service definitions are auto-generated from protobuf source files under vendor/
by using ttrpc-codegen. So please do not
edit those auto-generated source files. If upgrading/modification is needed, please follow the steps:
- Synchronize the latest protobuf source files from the upstream projects into directory 'vendor/'.
- Re-generate the source files by
cargo build --features=generate_bindings
. - Commit the synchronized protobuf source files and auto-generated source files, keeping them in synchronization.
Usage
Add containerd-shim-client
as a dependency in your Cargo.toml
[]
= "0.1"
Basic client code looks as follows:
let client = connect?;
let task_client = new;
let context = with_timeout;
let req = ConnectRequest ;
let resp = task_client.connect?;
Example
The way to build the ttRPC client connect example: