Fix shim example

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko 2021-07-22 12:39:08 -07:00
parent bcdb1d950f
commit 81a57058b6
2 changed files with 10 additions and 5 deletions

View File

@ -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<shim::api::StateResponse> {
) -> protos::ttrpc::Result<shim::api::StateResponse> {
debug!("Get state");
Ok(shim::api::StateResponse::default())
}

View File

@ -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;