runtime-rs: support save to persist file and restore

Support the functionality of save and restore for sandbox state

Fixes:#4891
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
This commit is contained in:
Zhongtao Hu
2022-07-30 22:27:23 +08:00
parent 97b7fe438a
commit 5aa83754e5
32 changed files with 638 additions and 34 deletions

View File

@@ -16,3 +16,4 @@ common = { path = "../runtimes/common" }
containerd-shim-protos = { version = "0.2.0", features = ["async"]}
logging = { path = "../../../libs/logging"}
runtimes = { path = "../runtimes" }
persist = { path = "../persist" }

View File

@@ -29,8 +29,7 @@ use crate::task_service::TaskService;
/// message buffer size
const MESSAGE_BUFFER_SIZE: usize = 8;
pub const KATA_PATH: &str = "/run/kata";
use persist::KATA_PATH;
pub struct ServiceManager {
receiver: Option<Receiver<Message>>,