pub struct GuestClient<T> { /* private fields */ }Expand description
Guest agent management
Implementations§
Source§impl GuestClient<Channel>
impl GuestClient<Channel>
Source§impl<T> GuestClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> GuestClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GuestClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn init(
&mut self,
request: impl IntoRequest<GuestInitRequest>,
) -> Result<Response<GuestInitResponse>, Status>
pub async fn init( &mut self, request: impl IntoRequest<GuestInitRequest>, ) -> Result<Response<GuestInitResponse>, Status>
Initialize guest environment (mounts, network) MUST be called first after connection, before Container.Init
Sourcepub async fn ping(
&mut self,
request: impl IntoRequest<PingRequest>,
) -> Result<Response<PingResponse>, Status>
pub async fn ping( &mut self, request: impl IntoRequest<PingRequest>, ) -> Result<Response<PingResponse>, Status>
Health check
Sourcepub async fn shutdown(
&mut self,
request: impl IntoRequest<ShutdownRequest>,
) -> Result<Response<ShutdownResponse>, Status>
pub async fn shutdown( &mut self, request: impl IntoRequest<ShutdownRequest>, ) -> Result<Response<ShutdownResponse>, Status>
Shutdown guest agent gracefully
Sourcepub async fn quiesce(
&mut self,
request: impl IntoRequest<QuiesceRequest>,
) -> Result<Response<QuiesceResponse>, Status>
pub async fn quiesce( &mut self, request: impl IntoRequest<QuiesceRequest>, ) -> Result<Response<QuiesceResponse>, Status>
Quiesce all writable filesystems (FIFREEZE ioctl). Flushes dirty pages and blocks new writes atomically. Used before SIGSTOP for point-in-time consistent snapshots. Follows QEMU guest-agent’s guest-fsfreeze-freeze protocol.
Sourcepub async fn thaw(
&mut self,
request: impl IntoRequest<ThawRequest>,
) -> Result<Response<ThawResponse>, Status>
pub async fn thaw( &mut self, request: impl IntoRequest<ThawRequest>, ) -> Result<Response<ThawResponse>, Status>
Thaw previously quiesced filesystems (FITHAW ioctl). Must be called after SIGCONT to unblock writes.
Trait Implementations§
Source§impl<T: Clone> Clone for GuestClient<T>
impl<T: Clone> Clone for GuestClient<T>
Source§fn clone(&self) -> GuestClient<T>
fn clone(&self) -> GuestClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for GuestClient<T>
impl<T> RefUnwindSafe for GuestClient<T>where
T: RefUnwindSafe,
impl<T> Send for GuestClient<T>where
T: Send,
impl<T> Sync for GuestClient<T>where
T: Sync,
impl<T> Unpin for GuestClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for GuestClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for GuestClient<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request