pub trait Guest:
Send
+ Sync
+ 'static {
// Required methods
fn init<'life0, 'async_trait>(
&'life0 self,
request: Request<GuestInitRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GuestInitResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ping<'life0, 'async_trait>(
&'life0 self,
request: Request<PingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PingResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shutdown<'life0, 'async_trait>(
&'life0 self,
request: Request<ShutdownRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ShutdownResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn quiesce<'life0, 'async_trait>(
&'life0 self,
request: Request<QuiesceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<QuiesceResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn thaw<'life0, 'async_trait>(
&'life0 self,
request: Request<ThawRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ThawResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with GuestServer.
Required Methods§
Sourcefn init<'life0, 'async_trait>(
&'life0 self,
request: Request<GuestInitRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GuestInitResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 self,
request: Request<GuestInitRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GuestInitResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize guest environment (mounts, network) MUST be called first after connection, before Container.Init
Sourcefn ping<'life0, 'async_trait>(
&'life0 self,
request: Request<PingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PingResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ping<'life0, 'async_trait>(
&'life0 self,
request: Request<PingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PingResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check
Sourcefn shutdown<'life0, 'async_trait>(
&'life0 self,
request: Request<ShutdownRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ShutdownResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
request: Request<ShutdownRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ShutdownResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shutdown guest agent gracefully
Sourcefn quiesce<'life0, 'async_trait>(
&'life0 self,
request: Request<QuiesceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<QuiesceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn quiesce<'life0, 'async_trait>(
&'life0 self,
request: Request<QuiesceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<QuiesceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Sourcefn thaw<'life0, 'async_trait>(
&'life0 self,
request: Request<ThawRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ThawResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn thaw<'life0, 'async_trait>(
&'life0 self,
request: Request<ThawRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ThawResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Thaw previously quiesced filesystems (FITHAW ioctl). Must be called after SIGCONT to unblock writes.