pub struct MountManager { /* private fields */ }Expand description
Manager for FUSE mounts
Keeps mounts alive and synced, handling lifecycle and cache invalidation.
Implementations§
Source§impl MountManager
impl MountManager
Sourcepub fn new(
db: Database,
peer: Peer<Database>,
config: MountManagerConfig,
) -> Self
pub fn new( db: Database, peer: Peer<Database>, config: MountManagerConfig, ) -> Self
Create a new mount manager
Sourcepub fn subscribe_sync_events(&self) -> Receiver<SyncEvent>
pub fn subscribe_sync_events(&self) -> Receiver<SyncEvent>
Subscribe to sync events
Sourcepub fn sync_sender(&self) -> Sender<SyncEvent>
pub fn sync_sender(&self) -> Sender<SyncEvent>
Get a reference to the sync event sender
Sourcepub async fn on_bucket_synced(&self, bucket_id: Uuid) -> Result<(), MountError>
pub async fn on_bucket_synced(&self, bucket_id: Uuid) -> Result<(), MountError>
Called when a bucket sync completes - refresh affected mounts
If the live mount has unsaved local changes (ops_log non-empty), merges them with incoming changes using conflict resolution. Otherwise, simply reloads from the new head.
Sourcepub async fn create_mount(
&self,
bucket_id: Uuid,
mount_point: &str,
auto_mount: bool,
read_only: bool,
cache_size_mb: Option<u32>,
cache_ttl_secs: Option<u32>,
) -> Result<FuseMount, MountError>
pub async fn create_mount( &self, bucket_id: Uuid, mount_point: &str, auto_mount: bool, read_only: bool, cache_size_mb: Option<u32>, cache_ttl_secs: Option<u32>, ) -> Result<FuseMount, MountError>
Create a new mount configuration
Sourcepub async fn get(
&self,
mount_id: &Uuid,
) -> Result<Option<FuseMount>, MountError>
pub async fn get( &self, mount_id: &Uuid, ) -> Result<Option<FuseMount>, MountError>
Get a mount by ID
Sourcepub async fn update(
&self,
mount_id: &Uuid,
mount_point: Option<&str>,
enabled: Option<bool>,
auto_mount: Option<bool>,
read_only: Option<bool>,
cache_size_mb: Option<u32>,
cache_ttl_secs: Option<u32>,
) -> Result<Option<FuseMount>, MountError>
pub async fn update( &self, mount_id: &Uuid, mount_point: Option<&str>, enabled: Option<bool>, auto_mount: Option<bool>, read_only: Option<bool>, cache_size_mb: Option<u32>, cache_ttl_secs: Option<u32>, ) -> Result<Option<FuseMount>, MountError>
Update a mount configuration
Sourcepub async fn delete(&self, mount_id: &Uuid) -> Result<bool, MountError>
pub async fn delete(&self, mount_id: &Uuid) -> Result<bool, MountError>
Delete a mount configuration
Sourcepub async fn start(&self, mount_id: &Uuid) -> Result<(), MountError>
pub async fn start(&self, mount_id: &Uuid) -> Result<(), MountError>
Start a mount (spawn FUSE process)
Sourcepub async fn stop_all(&self) -> Result<(), MountError>
pub async fn stop_all(&self) -> Result<(), MountError>
Stop all running mounts
Sourcepub async fn start_auto(&self) -> Result<(), MountError>
pub async fn start_auto(&self) -> Result<(), MountError>
Start all mounts configured for auto-mount
Sourcepub async fn get_live_mount(
&self,
mount_id: &Uuid,
) -> Option<Arc<RwLock<Mount>>>
pub async fn get_live_mount( &self, mount_id: &Uuid, ) -> Option<Arc<RwLock<Mount>>>
Get a live mount by ID
Sourcepub async fn get_mount_cache(&self, mount_id: &Uuid) -> Option<FileCache>
pub async fn get_mount_cache(&self, mount_id: &Uuid) -> Option<FileCache>
Get the cache for a live mount
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MountManager
impl !RefUnwindSafe for MountManager
impl Send for MountManager
impl Sync for MountManager
impl Unpin for MountManager
impl !UnwindSafe for MountManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more
Source§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
Source§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
Source§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
Source§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
Source§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
Intercept requests with over-sized payloads and convert them into
413 Payload Too Large responses. Read more