Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server manages the FUSE mount, delegating to a pluggable backend.
func NewServer ¶
func NewServer( mountPoint string, nzbfs *nzbfilesystem.NzbFilesystem, logger *slog.Logger, cfg config.FuseConfig, st StreamTracker, ) *Server
NewServer creates a new FUSE server instance.
func (*Server) BackendType ¶
BackendType returns the active backend type.
func (*Server) CleanupMount ¶
func (s *Server) CleanupMount()
CleanupMount checks for and cleans up stale mounts at the mountpoint.
func (*Server) ForceUnmount ¶
ForceUnmount attempts to lazy/force unmount the mountpoint using platform-specific commands.
func (*Server) Mount ¶
Mount mounts the filesystem and starts serving. The onReady callback is called after the kernel mount is confirmed live. This method blocks until the filesystem is unmounted.
func (*Server) RefreshDirectory ¶
RefreshDirectory invalidates the kernel cache for a named directory entry. Only works with backends that implement backend.Refresher (e.g. hanwen).
func (*Server) ValidateMount ¶
ValidateMount checks if the mount point is responsive by stat-ing the directory with a timeout. Uses an atomic guard to prevent multiple concurrent os.Stat goroutines (which leak when the mount is stuck). If a validation is already in-flight, returns the last cached result.
type StreamTracker ¶
type StreamTracker = backend.StreamTracker
StreamTracker is the subset of stream tracking needed by the FUSE layer. *api.StreamTracker satisfies this interface.