pub struct ConfigV2 {
pub version: u32,
pub id: String,
pub backend: Option<BackendConfigV2>,
pub cache: Option<CacheConfigV2>,
pub rafs: Option<RafsConfigV2>,
pub internal: ConfigV2Internal,
}Expand description
Configuration file format version 2, based on Toml.
Fields§
§version: u32Configuration file format version number, must be 2.
id: StringIdentifier for the instance.
backend: Option<BackendConfigV2>Configuration information for storage backend.
cache: Option<CacheConfigV2>Configuration information for local cache system.
rafs: Option<RafsConfigV2>Configuration information for RAFS filesystem.
internal: ConfigV2InternalInternal runtime configuration.
Implementations§
Source§impl ConfigV2
impl ConfigV2
Sourcepub fn new_localfs(id: &str, dir: &str) -> Result<Self>
pub fn new_localfs(id: &str, dir: &str) -> Result<Self>
Create a new configuration object for backend-localfs and filecache.
Sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
Read configuration information from a file.
Sourcepub fn get_backend_config(&self) -> Result<&BackendConfigV2>
pub fn get_backend_config(&self) -> Result<&BackendConfigV2>
Get configuration information for storage backend.
Sourcepub fn get_cache_config(&self) -> Result<&CacheConfigV2>
pub fn get_cache_config(&self) -> Result<&CacheConfigV2>
Get configuration information for cache subsystem.
Sourcepub fn get_cache_working_directory(&self) -> Result<String>
pub fn get_cache_working_directory(&self) -> Result<String>
Get cache working directory.
Sourcepub fn get_rafs_config(&self) -> Result<&RafsConfigV2>
pub fn get_rafs_config(&self) -> Result<&RafsConfigV2>
Get configuration information for RAFS filesystem.
Sourcepub fn clone_without_secrets(&self) -> Self
pub fn clone_without_secrets(&self) -> Self
Clone the object with all secrets removed.
Sourcepub fn is_chunk_validation_enabled(&self) -> bool
pub fn is_chunk_validation_enabled(&self) -> bool
Check whether chunk digest validation is enabled or not.
Sourcepub fn is_fs_cache(&self) -> bool
pub fn is_fs_cache(&self) -> bool
Check whether fscache is enabled or not.
Sourcepub fn update_registry_auth_info(&mut self, auth: &Option<String>)
pub fn update_registry_auth_info(&mut self, auth: &Option<String>)
Fill authorization for registry backend.