daemon

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLogPath

func DefaultLogPath() (string, error)

func DefaultSocketPath

func DefaultSocketPath() (string, error)

func Run

func Run(ctx context.Context, socketPath string, server *Server) error

func SupportedManagedTypes

func SupportedManagedTypes() []string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(socketPath string) *Client

func (*Client) Health

func (c *Client) Health(ctx context.Context) (*daemonapi.HealthResponse, error)

func (*Client) Mount

func (*Client) Shutdown

func (c *Client) Shutdown(ctx context.Context) (*daemonapi.ShutdownResponse, error)

func (*Client) Status

func (*Client) Unmount

func (c *Client) Unmount(ctx context.Context, entries []daemonapi.EntrySnapshot) (*daemonapi.BatchResponse, error)

type MountSession

type MountSession interface {
	Unmount() error
	Done() <-chan error
}

type Mounter

type Mounter interface {
	Mount(entry daemonapi.EntrySnapshot) (MountSession, error)
}

func NewRcloneMounter

func NewRcloneMounter() Mounter

type RcloneMounter

type RcloneMounter struct{}

func (*RcloneMounter) Mount

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(sessions *SessionManager) *Server

func NewServerWithShutdown

func NewServerWithShutdown(sessions *SessionManager, shutdown func()) *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SessionManager

type SessionManager struct {
	// contains filtered or unexported fields
}

func NewSessionManager

func NewSessionManager(mounter Mounter) *SessionManager

func (*SessionManager) ManagedTypes

func (m *SessionManager) ManagedTypes() []string

func (*SessionManager) Mount

func (*SessionManager) MountedSessionCount

func (m *SessionManager) MountedSessionCount() int

func (*SessionManager) Status

func (*SessionManager) Unmount

func (*SessionManager) UnmountAll

func (m *SessionManager) UnmountAll() (int, []daemonapi.ShutdownError)

Jump to

Keyboard shortcuts

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