pub struct DockerSandbox { /* private fields */ }Implementations§
Source§impl DockerSandbox
impl DockerSandbox
Sourcepub async fn check_docker_available() -> bool
pub async fn check_docker_available() -> bool
Check if Docker daemon is available
Sourcepub async fn new() -> Result<Self, AgentError>
pub async fn new() -> Result<Self, AgentError>
Create a new DockerSandbox instance
Sourcepub async fn create_container(&self, image: &str) -> Result<String, AgentError>
pub async fn create_container(&self, image: &str) -> Result<String, AgentError>
Create a container with specified image
Sourcepub async fn execute_in_container(
&self,
container: &str,
cmd: &[String],
) -> Result<String, AgentError>
pub async fn execute_in_container( &self, container: &str, cmd: &[String], ) -> Result<String, AgentError>
Execute a command in the container
Sourcepub async fn start_container(&self, container: &str) -> Result<(), AgentError>
pub async fn start_container(&self, container: &str) -> Result<(), AgentError>
Start a container
Sourcepub async fn cleanup_container(&self, container: &str)
pub async fn cleanup_container(&self, container: &str)
Stop and remove a container
Auto Trait Implementations§
impl Freeze for DockerSandbox
impl !RefUnwindSafe for DockerSandbox
impl Send for DockerSandbox
impl Sync for DockerSandbox
impl Unpin for DockerSandbox
impl UnsafeUnpin for DockerSandbox
impl !UnwindSafe for DockerSandbox
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more