Struct nydus::FusedevDaemon

source ·
pub struct FusedevDaemon { /* private fields */ }
Expand description

Nydus daemon to implement FUSE servers by accessing /dev/fuse.

One FUSE mountpoint will be created for each FusedevDaemon object. Every FusedevDaemon object has a built-in Vfs object, which can be used to mount multiple RAFS and/or passthroughfs instances.

Implementations§

source§

impl FusedevDaemon

source

pub fn new( trigger: Sender<DaemonStateMachineInput>, receiver: Receiver<Result<(), Error>>, vfs: Arc<Vfs>, mountpoint: &Path, threads_cnt: u32, waker: Arc<Waker>, bti: BuildTimeInfo, id: Option<String>, supervisor: Option<String>, readonly: bool, fp: FailoverPolicy ) -> Result<FusedevDaemon, Error>

Create a new instance of FusedevDaemon.

Trait Implementations§

source§

impl DaemonStateMachineSubscriber for FusedevDaemon

source§

fn on_event(&self, event: DaemonStateMachineInput) -> Result<(), Error>

Event handler to process state transition events. Read more
source§

impl NydusDaemon for FusedevDaemon

source§

fn as_any(&self) -> &(dyn Any + 'static)

Cast self to trait object of Any to support object downcast.
source§

fn id(&self) -> Option<String>

Get optional daemon identifier.
source§

fn version(&self) -> BuildTimeInfo

Get build and version information.
source§

fn get_state(&self) -> DaemonState

Get daemon working state.
source§

fn set_state(&self, state: DaemonState)

Set daemon working state.
source§

fn start(&self) -> Result<(), Error>

Start the daemon object to serve incoming requests.
source§

fn umount(&self) -> Result<(), Error>

Umount the FUSE filesystem.
source§

fn stop(&self)

Stop the daemon object.
source§

fn wait(&self) -> Result<(), Error>

Wait for daemon to exit.
source§

fn wait_service(&self) -> Result<(), Error>

Wait for service worker thread to exit.
source§

fn wait_state_machine(&self) -> Result<(), Error>

Wait for state machine worker thread to exit.
source§

fn supervisor(&self) -> Option<String>

Get supervisor configuration information.
source§

fn save(&self) -> Result<(), Error>

Save state for online upgrade.
source§

fn restore(&self) -> Result<(), Error>

Restore state for online upgrade.
source§

fn get_default_fs_service(&self) -> Option<Arc<dyn FsService + 'static>>

Set default filesystem service object.
source§

fn export_info(&self, include_fs_info: bool) -> Result<String, Error>

Get status information about the daemon.
source§

fn trigger_stop(&self) -> Result<(), Error>

Trigger Stop transition event to stop the daemon.
source§

fn trigger_exit(&self) -> Result<(), Error>

Trigger transition events to move the state machine to STOPPED state.
source§

fn trigger_takeover(&self) -> Result<(), Error>

Trigger Takeover transition event to take over control from old instance.
source§

fn trigger_start(&self) -> Result<(), Error>

Trigger Start transition event to start the new instance.
source§

fn get_blob_cache_mgr(&self) -> Option<Arc<BlobCacheMgr>>

Get the optional BlobCacheMgr object.
source§

fn delete_blob(&self, _blob_id: String) -> Result<(), Error>

Delete a blob object managed by the daemon.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more