rust-extensions/crates/shim-protos
Maksym Pavlenko d3852a5fcd Implement remote publisher
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-07-26 16:59:21 -07:00
..
examples Fix linter 2021-07-26 16:00:48 -07:00
src Implement remote publisher 2021-07-26 16:59:21 -07:00
vendor Generate TTRPC events client 2021-07-26 15:53:36 -07:00
Cargo.toml Add shim client example 2021-07-26 15:41:40 -07:00
README.md Add shim client example 2021-07-26 15:41:40 -07:00
build.rs Generate TTRPC events client 2021-07-26 15:53:36 -07:00

README.md

Shim protos

TTRPC bindings for containerd's shim events and interfaces.

Look and feel

Basic client code looks as follows:

let client = client::Client::connect(socket_path)?;
let task_client = client::TaskClient::new(client);

let context = client::ttrpc::context::with_timeout(0);

let req = client::api::ConnectRequest {
    id: pid,
    ..Default::default()
};

let resp = task_client.connect(context, &req)?;

Example

Have a look on example here.

$ cargo build --example connect
$ sudo ./connect unix:///containerd-shim/shim_socket_path.sock