Skip to main content

import_layer

Function import_layer 

Source
pub async fn import_layer<ObjectID: FsVerityHashValue>(
    repo: &Arc<Repository<ObjectID>>,
    diff_id: &OciDigest,
    name: Option<&str>,
    tar_stream: impl AsyncRead + Unpin,
) -> Result<(ObjectID, ImportStats)>
Expand description

Imports a container layer from a tar stream into the repository.

Converts the tar stream into a composefs split stream format and stores it in the repository. If a name is provided, creates a reference to the imported layer for easier access.

Returns the fs-verity hash value and import statistics for the stored split stream.