Expand description
Shared, content-agnostic splitdirfdstream producer and consumer for layer synchronisation.
This module holds the blocking logic for producing a splitdirfdstream from a
stored layer and for draining one back into a repository. It depends only on
the (tiny) composefs-splitdirfdstream crate, not the containers-storage /
podman stack, so it is always compiled — including in builds that do not
enable the containers-storage feature.
Callers:
crates/composefs-oci/src/cstor.rs— the containers-storage import path (only built with thecontainers-storagefeature).composefs-ctlvarlink server — repo-to-repo layer synchronisation viaGetLayer/PutLayer, and theoci copycommand.
Enums§
- Verified
Drain Error - Errors returned by the diff-id-verifying drain path.
Functions§
- drain_
splitdirfdstream - Drain the
splitdirfdstreampipe and write the resulting layer splitstream. - drain_
splitdirfdstream_ verified - Like
drain_splitdirfdstream, but additionally verifies that the reconstructed (uncompressed tar) content hashes todiff_id, and only commits the layer splitstream to the repository if it matches. - finalize_
oci_ image - Finalize an OCI image whose layers are already imported into
repo. - process_
file_ content - Store the content of one file fd into the splitstream, choosing inline vs external storage based on the file size.
- produce_
layer_ splitdirfdstream - Produce a
splitdirfdstreamfor the layer splitstream identified bylayer_verity, writing it toout.
Type Aliases§
- Finalize
Result - A type alias for the (manifest, config) digest-and-verity pair returned by
finalize_oci_image.