pub struct DockerProcessManager { /* private fields */ }Expand description
Docker process manager for container lifecycle management.
Implementations§
Source§impl DockerProcessManager
impl DockerProcessManager
Sourcepub fn new() -> DockerProcessManager
pub fn new() -> DockerProcessManager
Create a new DockerProcessManager instance.
Sourcepub async fn list_containers(&self) -> Vec<DockerContainerInfo>
pub async fn list_containers(&self) -> Vec<DockerContainerInfo>
List all managed containers.
Sourcepub async fn get_container(
&self,
session_id: &str,
) -> Option<DockerContainerInfo>
pub async fn get_container( &self, session_id: &str, ) -> Option<DockerContainerInfo>
Get a container by session ID.
Sourcepub async fn acquire_container(
&self,
config: DockerContainerConfig,
) -> Result<DockerContainerInfo, String>
pub async fn acquire_container( &self, config: DockerContainerConfig, ) -> Result<DockerContainerInfo, String>
Acquire a container for a session, reusing the persistent container if healthy. This is the main entry point for container lifecycle management with reuse support.
Sourcepub async fn start_container(
&self,
config: DockerContainerConfig,
) -> Result<DockerContainerInfo, String>
pub async fn start_container( &self, config: DockerContainerConfig, ) -> Result<DockerContainerInfo, String>
Start a Docker container for an agent session.
Sourcepub async fn wait_for_healthy(
&self,
session_id: &str,
timeout_ms: Option<u64>,
) -> Result<(), String>
pub async fn wait_for_healthy( &self, session_id: &str, timeout_ms: Option<u64>, ) -> Result<(), String>
Wait for a container to become healthy.
Trait Implementations§
Source§impl Default for DockerProcessManager
impl Default for DockerProcessManager
Source§fn default() -> DockerProcessManager
fn default() -> DockerProcessManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DockerProcessManager
impl !RefUnwindSafe for DockerProcessManager
impl Send for DockerProcessManager
impl Sync for DockerProcessManager
impl Unpin for DockerProcessManager
impl UnsafeUnpin for DockerProcessManager
impl !UnwindSafe for DockerProcessManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more