pub struct RuntimeClient { /* private fields */ }Expand description
Async client for the rtmd Unix socket JSON line protocol.
Implementations§
Source§impl RuntimeClient
impl RuntimeClient
Sourcepub fn socket_path(&self) -> &Path
pub fn socket_path(&self) -> &Path
Return the Unix socket path this client connects to.
Sourcepub async fn request(
&self,
rpc: RuntimeRpc,
) -> Result<RuntimeResponse, ClientError>
pub async fn request( &self, rpc: RuntimeRpc, ) -> Result<RuntimeResponse, ClientError>
Send a raw protocol request and return the raw protocol response.
Sourcepub async fn spawn(
&self,
request: SpawnRequest,
) -> Result<SpawnedPayload, ClientError>
pub async fn spawn( &self, request: SpawnRequest, ) -> Result<SpawnedPayload, ClientError>
Spawn a runtime session and return the created lifecycle payload.
Sourcepub async fn kill(
&self,
request: KillRequest,
) -> Result<KillOutcome, ClientError>
pub async fn kill( &self, request: KillRequest, ) -> Result<KillOutcome, ClientError>
Kill a runtime session by session id.
Sourcepub async fn kill_by_pid(
&self,
request: KillByPidRequest,
) -> Result<KillOutcome, ClientError>
pub async fn kill_by_pid( &self, request: KillByPidRequest, ) -> Result<KillOutcome, ClientError>
Kill an arbitrary process id through the daemon admin path.
Sourcepub async fn status(
&self,
filter: StatusFilter,
) -> Result<StatusPayload, ClientError>
pub async fn status( &self, filter: StatusFilter, ) -> Result<StatusPayload, ClientError>
Query runtime lifecycle status.
Sourcepub async fn nudge(
&self,
request: NudgeRequest,
) -> Result<NudgeResponse, ClientError>
pub async fn nudge( &self, request: NudgeRequest, ) -> Result<NudgeResponse, ClientError>
Send a text nudge to a runtime session and return the delivery outcome.
Sourcepub async fn capture(
&self,
request: CaptureRequest,
) -> Result<CaptureResponse, ClientError>
pub async fn capture( &self, request: CaptureRequest, ) -> Result<CaptureResponse, ClientError>
Capture scrollback for a runtime session.
Sourcepub async fn validate_target(
&self,
target: &str,
) -> Result<ValidateTargetResponse, ClientError>
pub async fn validate_target( &self, target: &str, ) -> Result<ValidateTargetResponse, ClientError>
Validate a user supplied spawn target string.
Sourcepub async fn doctor(&self) -> Result<DoctorPayload, ClientError>
pub async fn doctor(&self) -> Result<DoctorPayload, ClientError>
Query daemon diagnostics.
Sourcepub async fn version(&self) -> Result<VersionPayload, ClientError>
pub async fn version(&self) -> Result<VersionPayload, ClientError>
Query the daemon version and protocol capability payload.
Sourcepub async fn events(
&self,
request: EventsRequest,
) -> Result<EventBatch, ClientError>
pub async fn events( &self, request: EventsRequest, ) -> Result<EventBatch, ClientError>
Query one batch of lifecycle events.
Trait Implementations§
Source§impl Clone for RuntimeClient
impl Clone for RuntimeClient
Source§fn clone(&self) -> RuntimeClient
fn clone(&self) -> RuntimeClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RuntimeClient
impl RefUnwindSafe for RuntimeClient
impl Send for RuntimeClient
impl Sync for RuntimeClient
impl Unpin for RuntimeClient
impl UnsafeUnpin for RuntimeClient
impl UnwindSafe for RuntimeClient
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