Skip to main content

Guest

Trait Guest 

Source
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;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with GuestServer.

Required Methods§

Source

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

Source

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

Source

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

Implementors§