Documentation
¶
Index ¶
- func ExitCode(err error) (int, bool)
- func TestConnection(ctx context.Context, rcUrl string, rcUser string, rcPass string, ...) error
- func WasHardTerminated(err error) bool
- type BandwidthStats
- type CoreStatsResponse
- type Manager
- func (m *Manager) GetAllMounts() map[string]*MountInfo
- func (m *Manager) GetBandwidthStats(ctx context.Context) (*BandwidthStats, error)
- func (m *Manager) GetCoreStats(ctx context.Context) (*CoreStatsResponse, error)
- func (m *Manager) GetLogger() *slog.Logger
- func (m *Manager) GetMemoryUsage(ctx context.Context) (*MemoryStats, error)
- func (m *Manager) GetMountInfo(provider string) (*MountInfo, bool)
- func (m *Manager) GetStats(ctx context.Context) (*Stats, error)
- func (m *Manager) GetVersion(ctx context.Context) (*VersionResponse, error)
- func (m *Manager) HealthCheck(ctx context.Context) error
- func (m *Manager) IsMounted(provider string) bool
- func (m *Manager) IsReady() bool
- func (m *Manager) MonitorMounts(ctx context.Context)
- func (m *Manager) Mount(ctx context.Context, provider, mountPath, webdavURL string) error
- func (m *Manager) RecoverMount(ctx context.Context, provider string) error
- func (m *Manager) RefreshDir(ctx context.Context, provider string, dirs []string) error
- func (m *Manager) Start(ctx context.Context) error
- func (m *Manager) Stop() error
- func (m *Manager) Unmount(ctx context.Context, provider string) error
- func (m *Manager) UnmountAll(ctx context.Context) error
- func (m *Manager) WaitForReady(timeout time.Duration) error
- type MemoryStats
- type Mount
- type MountInfo
- type RCRequest
- type RCResponse
- type RcloneRcClient
- type Stats
- type TransferringStat
- type VersionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestConnection ¶
func WasHardTerminated ¶
WasHardTerminated reports true iff the process was ended by SIGKILL or SIGTERM.
Types ¶
type BandwidthStats ¶
type CoreStatsResponse ¶
type CoreStatsResponse struct {
Bytes int64 `json:"bytes"`
Checks int `json:"checks"`
DeletedDirs int `json:"deletedDirs"`
Deletes int `json:"deletes"`
ElapsedTime float64 `json:"elapsedTime"`
Errors int `json:"errors"`
Eta int `json:"eta"`
Speed float64 `json:"speed"`
TotalBytes int64 `json:"totalBytes"`
TotalChecks int `json:"totalChecks"`
TotalTransfers int `json:"totalTransfers"`
TransferTime float64 `json:"transferTime"`
Transfers int `json:"transfers"`
Transferring []TransferringStat `json:"transferring,omitempty"`
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles the rclone RC server and provides mount operations
func NewManager ¶
NewManager creates a new rclone RC manager
func (*Manager) GetAllMounts ¶
GetAllMounts returns information about all mounts
func (*Manager) GetBandwidthStats ¶
func (m *Manager) GetBandwidthStats(ctx context.Context) (*BandwidthStats, error)
GetBandwidthStats returns bandwidth usage for all transfers
func (*Manager) GetCoreStats ¶
func (m *Manager) GetCoreStats(ctx context.Context) (*CoreStatsResponse, error)
func (*Manager) GetMemoryUsage ¶
func (m *Manager) GetMemoryUsage(ctx context.Context) (*MemoryStats, error)
GetMemoryUsage returns memory usage statistics
func (*Manager) GetMountInfo ¶
GetMountInfo returns information about a specific mount
func (*Manager) GetVersion ¶
func (m *Manager) GetVersion(ctx context.Context) (*VersionResponse, error)
GetVersion returns rclone version information
func (*Manager) HealthCheck ¶
HealthCheck performs comprehensive health checks on the rclone system
func (*Manager) MonitorMounts ¶
MonitorMounts continuously monitors mount health and attempts recovery
func (*Manager) RecoverMount ¶
RecoverMount attempts to recover a failed mount
func (*Manager) RefreshDir ¶
RefreshDir refreshes directories in the VFS cache
func (*Manager) UnmountAll ¶
UnmountAll unmounts all mounts
type MemoryStats ¶
type Mount ¶
type Mount struct {
Provider string
LocalPath string
WebDAVURL string
// contains filtered or unexported fields
}
Mount represents a mount using the rclone RC client
func (*Mount) GetMountInfo ¶
GetMountInfo returns mount information
func (*Mount) RefreshDir ¶
RefreshDir refreshes directories in the mount
type RCResponse ¶
type RcloneRcClient ¶
type RcloneRcClient interface {
RefreshDir(ctx context.Context, provider string, dirs []string) error
}
func NewRcloneRcClient ¶
func NewRcloneRcClient( config *config.Manager, httpClient *http.Client, ) RcloneRcClient
type Stats ¶
type Stats struct {
Enabled bool `json:"enabled"`
Ready bool `json:"server_ready"`
Core CoreStatsResponse `json:"core"`
Memory MemoryStats `json:"memory"`
Mount map[string]*MountInfo `json:"mount"`
Bandwidth BandwidthStats `json:"bandwidth"`
Version VersionResponse `json:"version"`
}
Stats represents rclone statistics