fuse

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 11 Imported by: 0

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) ForceUnmount

func (s *Server) ForceUnmount() error

ForceUnmount attempts to lazy/force unmount the mountpoint using platform-specific commands.

func (*Server) Mount

func (s *Server) Mount(onReady func()) error

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) Unmount

func (s *Server) Unmount() error

Unmount gracefully unmounts the filesystem, falling back to force unmount.

func (*Server) ValidateMount

func (s *Server) ValidateMount() (bool, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL