Skip to main content

RemoteExecutor

Trait RemoteExecutor 

Source
pub trait RemoteExecutor: Send + Sync {
    // Required methods
    fn execute(
        &self,
        machine_id: &str,
        command: &str,
        working_dir: Option<&str>,
    ) -> Result<RemoteOutput>;
    fn ping(&self, machine_id: &str) -> Result<bool>;
    fn executor_type(&self) -> &str;
}
Expand description

Trait for remote execution backends.

Required Methods§

Source

fn execute( &self, machine_id: &str, command: &str, working_dir: Option<&str>, ) -> Result<RemoteOutput>

Execute a command on a remote machine.

Source

fn ping(&self, machine_id: &str) -> Result<bool>

Check if the remote machine is reachable.

Source

fn executor_type(&self) -> &str

Get the executor type name (e.g., “ssh”, “relay”).

Implementors§