pub struct RelayExecutor { /* private fields */ }Expand description
Relay-based remote executor that tunnels through mur.run.
Implementations§
Source§impl RelayExecutor
impl RelayExecutor
Sourcepub fn new(config: RelayConfig) -> Self
pub fn new(config: RelayConfig) -> Self
Create a new relay executor.
Sourcepub fn with_timeout(self, timeout_secs: u64) -> Self
pub fn with_timeout(self, timeout_secs: u64) -> Self
Set the default command timeout.
Sourcepub fn channel_id(&self) -> &str
pub fn channel_id(&self) -> &str
Get the channel ID.
Sourcepub fn build_command(
&self,
machine_id: &str,
command: &str,
working_dir: Option<&str>,
) -> RelayCommand
pub fn build_command( &self, machine_id: &str, command: &str, working_dir: Option<&str>, ) -> RelayCommand
Build a relay command message.
Sourcepub fn serialize_command(&self, cmd: &RelayCommand) -> Result<String>
pub fn serialize_command(&self, cmd: &RelayCommand) -> Result<String>
Serialize a relay command to JSON for sending over WebSocket.
Sourcepub fn parse_response(&self, json: &str) -> Result<RelayResponse>
pub fn parse_response(&self, json: &str) -> Result<RelayResponse>
Parse a relay response from JSON received over WebSocket.
Trait Implementations§
Source§impl Clone for RelayExecutor
impl Clone for RelayExecutor
Source§fn clone(&self) -> RelayExecutor
fn clone(&self) -> RelayExecutor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelayExecutor
impl Debug for RelayExecutor
Source§impl RemoteExecutor for RelayExecutor
impl RemoteExecutor for RelayExecutor
Auto Trait Implementations§
impl Freeze for RelayExecutor
impl RefUnwindSafe for RelayExecutor
impl Send for RelayExecutor
impl Sync for RelayExecutor
impl Unpin for RelayExecutor
impl UnsafeUnpin for RelayExecutor
impl UnwindSafe for RelayExecutor
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