diff --git a/src/agent/src/image.rs b/src/agent/src/image.rs new file mode 100644 index 000000000..151ab8943 --- /dev/null +++ b/src/agent/src/image.rs @@ -0,0 +1,24 @@ +// Copyright (c) 2021 Alibaba Cloud +// Copyright (c) 2021, 2023 IBM Corporation +// Copyright (c) 2022 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +use std::sync::Arc; +use tokio::sync::Mutex; +use crate::sandbox::Sandbox; + +// Convenience function to obtain the scope logger. +fn sl() -> slog::Logger { + slog_scope::logger().new(o!("subsystem" => "image")) +} + +pub struct ImageService { + sandbox: Arc>, +} +impl ImageService { + pub fn new(sandbox: Arc>) -> Self { + Self { sandbox } + } +} diff --git a/src/agent/src/main.rs b/src/agent/src/main.rs index 31482eb25..8bb7fa042 100644 --- a/src/agent/src/main.rs +++ b/src/agent/src/main.rs @@ -73,6 +73,7 @@ use tokio::{ task::JoinHandle, }; +mod image; mod rpc; mod tracer; diff --git a/src/agent/src/rpc.rs b/src/agent/src/rpc.rs index bd760db94..56cff23ed 100644 --- a/src/agent/src/rpc.rs +++ b/src/agent/src/rpc.rs @@ -54,6 +54,7 @@ use rustjail::process::ProcessOperations; use crate::device::{add_devices, get_virtio_blk_pci_device_name, update_env_pci}; use crate::features::get_build_features; +use crate::image; use crate::linux_abi::*; use crate::metrics::get_metrics; use crate::mount::baremount;