pub struct DaemonController { /* private fields */ }Expand description
Controller to manage registered filesystem/blobcache/fscache services.
Implementations§
Source§impl DaemonController
impl DaemonController
Sourcepub fn new() -> Self
pub fn new() -> Self
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>,
) -> Option<Arc<dyn NydusDaemon>>
pub fn set_daemon( &self, daemon: Arc<dyn NydusDaemon>, ) -> Option<Arc<dyn NydusDaemon>>
Set the daemon service object.
Sourcepub fn get_daemon(&self) -> Arc<dyn NydusDaemon>
pub fn get_daemon(&self) -> Arc<dyn NydusDaemon>
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>,
) -> Option<Arc<dyn FsService>>
pub fn set_fs_service( &self, service: Arc<dyn FsService>, ) -> Option<Arc<dyn FsService>>
Set the default fs service object.
Sourcepub fn get_fs_service(&self) -> Option<Arc<dyn FsService>>
pub fn get_fs_service(&self) -> Option<Arc<dyn FsService>>
Get the default fs service object.
Sourcepub fn notify_shutdown(&self)
pub fn notify_shutdown(&self)
Notify controller shutdown
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DaemonController
impl RefUnwindSafe for DaemonController
impl Send for DaemonController
impl Sync for DaemonController
impl Unpin for DaemonController
impl UnwindSafe for DaemonController
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