Struct nydus::daemon::DaemonController
source · pub struct DaemonController { /* private fields */ }Expand description
Controller to manage registered filesystem/blobcache/fscache services.
Implementations§
source§impl DaemonController
impl DaemonController
sourcepub fn new() -> DaemonController
pub fn new() -> DaemonController
Create a new instance of DaemonController.
sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Check whether the service controller is still in active/working state.
sourcepub fn alloc_waker(&self) -> Arc<Waker>
pub fn alloc_waker(&self) -> Arc<Waker>
Allocate a waker to notify stop events.
sourcepub fn set_singleton_mode(&self, enabled: bool)
pub fn set_singleton_mode(&self, enabled: bool)
Enable/disable singleton mode.
sourcepub fn set_daemon(
&self,
daemon: Arc<dyn NydusDaemon + 'static>
) -> Option<Arc<dyn NydusDaemon + 'static>>
pub fn set_daemon( &self, daemon: Arc<dyn NydusDaemon + 'static> ) -> Option<Arc<dyn NydusDaemon + 'static>>
Set the daemon service object.
sourcepub fn get_daemon(&self) -> Arc<dyn NydusDaemon + 'static>
pub fn get_daemon(&self) -> Arc<dyn NydusDaemon + 'static>
Get the daemon service object.
Panic if called before set_daemon() has been called.
sourcepub fn get_blob_cache_mgr(&self) -> Option<Arc<BlobCacheMgr>>
pub fn get_blob_cache_mgr(&self) -> Option<Arc<BlobCacheMgr>>
Get the optional blob cache manager.
sourcepub fn set_blob_cache_mgr(
&self,
mgr: Arc<BlobCacheMgr>
) -> Option<Arc<BlobCacheMgr>>
pub fn set_blob_cache_mgr( &self, mgr: Arc<BlobCacheMgr> ) -> Option<Arc<BlobCacheMgr>>
Set the optional blob cache manager.
sourcepub fn set_fs_service(
&self,
service: Arc<dyn FsService + 'static>
) -> Option<Arc<dyn FsService + 'static>>
pub fn set_fs_service( &self, service: Arc<dyn FsService + 'static> ) -> Option<Arc<dyn FsService + 'static>>
Set the default fs service object.
sourcepub fn get_fs_service(&self) -> Option<Arc<dyn FsService + 'static>>
pub fn get_fs_service(&self) -> Option<Arc<dyn FsService + 'static>>
Get the default fs service object.
Trait Implementations§
source§impl Default for DaemonController
impl Default for DaemonController
source§fn default() -> DaemonController
fn default() -> DaemonController
Returns the “default value” for a type. Read more