pub struct PfStore { /* private fields */ }Expand description
A PfStore is the local-filesystem entry point. It owns one BlobStore
(default FsBlobStore) plus an images/ directory of one symlink per
manifest digest, kept for fast pf log traversal.
Implementations§
Source§impl PfStore
impl PfStore
Sourcepub fn open(root: impl AsRef<Path>) -> Result<Self>
pub fn open(root: impl AsRef<Path>) -> Result<Self>
Open the default on-disk store rooted at root.
Creates root/blobs/sha256/ and root/images/ if missing.
Sourcepub fn with_blobstore(
root: impl AsRef<Path>,
blobs: Arc<dyn BlobStore>,
) -> Result<Self>
pub fn with_blobstore( root: impl AsRef<Path>, blobs: Arc<dyn BlobStore>, ) -> Result<Self>
Open with a caller-supplied blob store (useful for in-memory tests).
Sourcepub fn blobs_arc(&self) -> Arc<dyn BlobStore>
pub fn blobs_arc(&self) -> Arc<dyn BlobStore>
Borrow the underlying blob store as an Arc (for cloning into capture
pipelines).
Sourcepub fn put_manifest(&self, m: &Manifest) -> Result<Digest256>
pub fn put_manifest(&self, m: &Manifest) -> Result<Digest256>
Persist a Manifest and return its content-id (the digest of its
canonical JSON serialization).
Also drops a marker file at images/<cid>.json so pf log can walk
without scanning every blob.
Sourcepub fn get_manifest(&self, cid: &Digest256) -> Result<Manifest>
pub fn get_manifest(&self, cid: &Digest256) -> Result<Manifest>
Load a manifest by content-id.
Auto Trait Implementations§
impl Freeze for PfStore
impl !RefUnwindSafe for PfStore
impl Send for PfStore
impl Sync for PfStore
impl Unpin for PfStore
impl UnsafeUnpin for PfStore
impl !UnwindSafe for PfStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more