Skip to main content

ImageStore

Trait ImageStore 

Source
pub trait ImageStore: Send + Sync {
    // Required methods
    fn list_images<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ImageInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn image_status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        image_ref: &'life1 str,
        verbose: bool,
    ) -> Pin<Box<dyn Future<Output = Result<ImageStatusResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn pull_with_auth<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        image_ref: &'life1 str,
        auth: Option<&'life2 AuthConfig>,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn remove_image<'life0, 'life1, 'async_trait>(
        &'life0 self,
        image_ref: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn fs_info<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<FilesystemUsage>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The image-store operations the CRI ImageHandler RPC surface dispatches to.

RafsStore satisfies this structurally (its existing public methods match). The trait is Send + Sync so it can be held as Arc<dyn ImageStore> on the long-lived WorkerService.

Required Methods§

Source

fn list_images<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ImageInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List available images.

Source

fn image_status<'life0, 'life1, 'async_trait>( &'life0 self, image_ref: &'life1 str, verbose: bool, ) -> Pin<Box<dyn Future<Output = Result<ImageStatusResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get image details for image_ref.

Source

fn pull_with_auth<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, image_ref: &'life1 str, auth: Option<&'life2 AuthConfig>, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Pull image_ref from a registry, optionally with auth. Returns the resolved image id (content address).

Source

fn remove_image<'life0, 'life1, 'async_trait>( &'life0 self, image_ref: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove a pulled image.

Source

fn fs_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<FilesystemUsage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Filesystem usage for the store’s backing storage (for CRI fsInfo).

Implementors§