pub struct RemoteRuntime { /* private fields */ }Expand description
Remote runtime that interacts with a Docker host over SSH.
Implementations§
Source§impl RemoteRuntime
impl RemoteRuntime
Sourcepub fn new(host: &str, user: Option<&str>, ssh_key_path: Option<String>) -> Self
pub fn new(host: &str, user: Option<&str>, ssh_key_path: Option<String>) -> Self
Create a new remote runtime.
Sourcepub fn from_config(config: &DockerConfig) -> Result<Self>
pub fn from_config(config: &DockerConfig) -> Result<Self>
Create from a DockerConfig.
Sourcepub fn set_container_id(&mut self, id: impl Into<String>)
pub fn set_container_id(&mut self, id: impl Into<String>)
Set the container ID on the remote host.
Sourcepub async fn is_alive(&self) -> IsAliveResponse
pub async fn is_alive(&self) -> IsAliveResponse
Health check — verify we can reach the remote Docker daemon.
Sourcepub async fn wait_for_ready(&self, timeout: f64, poll_interval: f64) -> bool
pub async fn wait_for_ready(&self, timeout: f64, poll_interval: f64) -> bool
Wait for the remote Docker daemon to become reachable.
Sourcepub async fn exec_in_container(
&self,
command: &str,
timeout_secs: f64,
) -> Result<BashObservation>
pub async fn exec_in_container( &self, command: &str, timeout_secs: f64, ) -> Result<BashObservation>
Execute a command inside the remote container.
Sourcepub async fn copy_to_container(
&self,
local_path: &str,
container_path: &str,
) -> Result<()>
pub async fn copy_to_container( &self, local_path: &str, container_path: &str, ) -> Result<()>
Copy a file from host to the remote container.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RemoteRuntime
impl RefUnwindSafe for RemoteRuntime
impl Send for RemoteRuntime
impl Sync for RemoteRuntime
impl Unpin for RemoteRuntime
impl UnsafeUnpin for RemoteRuntime
impl UnwindSafe for RemoteRuntime
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