pub struct DockerDeployment { /* private fields */ }Expand description
Manages Docker container lifecycle (create, start, stop, remove, inspect).
Implementations§
Source§impl DockerDeployment
impl DockerDeployment
Sourcepub fn new(config: DockerConfig) -> Result<Self>
pub fn new(config: DockerConfig) -> Result<Self>
Create a new deployment with the given config.
Sourcepub fn with_status_callback<F>(self, f: F) -> Self
pub fn with_status_callback<F>(self, f: F) -> Self
Set status callback.
Sourcepub fn is_started(&self) -> bool
pub fn is_started(&self) -> bool
Whether the deployment has started.
Sourcepub fn container_id(&self) -> Option<&str>
pub fn container_id(&self) -> Option<&str>
The container ID (if started).
Sourcepub fn container_name(&self) -> &str
pub fn container_name(&self) -> &str
The container name.
Sourcepub fn auth_token(&self) -> &str
pub fn auth_token(&self) -> &str
The auth token for the in-container server.
Sourcepub async fn pull_image(&self) -> Result<()>
pub async fn pull_image(&self) -> Result<()>
Pull the Docker image according to the pull policy.
Sourcepub async fn start_container(&mut self) -> Result<()>
pub async fn start_container(&mut self) -> Result<()>
Start the container in detached mode.
Sourcepub async fn inspect(&self) -> Result<ContainerStatus>
pub async fn inspect(&self) -> Result<ContainerStatus>
Inspect the container and return its status.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DockerDeployment
impl !RefUnwindSafe for DockerDeployment
impl Send for DockerDeployment
impl Sync for DockerDeployment
impl Unpin for DockerDeployment
impl UnsafeUnpin for DockerDeployment
impl !UnwindSafe for DockerDeployment
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