Struct nydus::blob_cache::BlobCacheMgr
source · pub struct BlobCacheMgr { /* private fields */ }
Expand description
Structure to manage and cache RAFS meta/data blob objects.
Implementations§
source§impl BlobCacheMgr
impl BlobCacheMgr
sourcepub fn new() -> BlobCacheMgr
pub fn new() -> BlobCacheMgr
Create a new instance of BlobCacheMgr
.
sourcepub fn add_blob_entry(&self, entry: &BlobCacheEntry) -> Result<(), Error>
pub fn add_blob_entry(&self, entry: &BlobCacheEntry) -> Result<(), Error>
Add a meta/data blob to be managed by the cache manager.
When adding a RAFS meta blob to the cache manager, all data blobs referenced by the bootstrap blob will also be added to the cache manager too. It may be used to add a RAFS container image to the cache manager.
Domains are used to control the blob sharing scope. All meta and data blobs associated
with the same domain will be shared/reused, but blobs associated with different domains are
isolated. The domain_id
is used to identify the associated domain.
sourcepub fn add_blob_list(&self, blobs: &BlobCacheList) -> Result<(), Error>
pub fn add_blob_list(&self, blobs: &BlobCacheList) -> Result<(), Error>
Add a list of meta/data blobs to be cached by the cache manager.
sourcepub fn remove_blob_entry(&self, param: &BlobCacheObjectId) -> Result<(), Error>
pub fn remove_blob_entry(&self, param: &BlobCacheObjectId) -> Result<(), Error>
Remove a meta/data blob object from the cache manager.
sourcepub fn get_config(&self, key: &str) -> Option<BlobCacheObjectConfig>
pub fn get_config(&self, key: &str) -> Option<BlobCacheObjectConfig>
Get configuration information of the cached blob with specified key
.