diff --git a/crates/shim/examples/empty.rs b/crates/shim/examples/empty-shim.rs similarity index 83% rename from crates/shim/examples/empty.rs rename to crates/shim/examples/empty-shim.rs index 9e48895..d8eaff7 100644 --- a/crates/shim/examples/empty.rs +++ b/crates/shim/examples/empty-shim.rs @@ -1,8 +1,13 @@ -use containerd_protos::shim::shim::DeleteResponse; -use log::debug; -use shim::StartOpts; use std::error::Error; +use containerd_shim as shim; +use shim::protos; + +use shim::api::DeleteResponse; +use shim::StartOpts; + +use log::debug; + struct Service; impl shim::Shim for Service { @@ -24,7 +29,7 @@ impl shim::Task for Service { &self, _ctx: &shim::Context, _request: shim::api::StateRequest, - ) -> shim::protos::ttrpc::Result { + ) -> protos::ttrpc::Result { debug!("Get state"); Ok(shim::api::StateResponse::default()) } diff --git a/crates/shim/src/lib.rs b/crates/shim/src/lib.rs index 66195c3..7361628 100644 --- a/crates/shim/src/lib.rs +++ b/crates/shim/src/lib.rs @@ -9,7 +9,7 @@ use std::sync::Arc; use std::thread; use std::time; -use containerd_shim_protos as protos; +pub use containerd_shim_protos as protos; use protos::protobuf::Message; use protos::shim::{shim::DeleteResponse, shim_ttrpc::create_task}; use protos::ttrpc::Server;