Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages multiple workspaces and selects the best one for each upload
func NewManager ¶
NewManager creates a new workspace manager from a comma-separated list of directories capacityThreshold specifies the safety margin multiplier (e.g., 4.0 requires 4x file size available)
func (*Manager) CreateTempFile ¶
CreateTempFile creates a temporary file in the selected workspace
func (*Manager) GetAllPaths ¶
GetAllPaths returns all workspace paths
func (*Manager) GetPrimaryPath ¶
GetPrimaryPath returns the fastest workspace path (used for non-upload temp files)
type Stats ¶
type Stats struct {
Path string
WriteMBps float64
AvailableBytes uint64
TotalBytes uint64
LastChecked time.Time
}
Stats returns statistics about all workspaces
type Workspace ¶
type Workspace struct {
Path string
WriteMBps float64 // Write throughput in MB/s
LastChecked time.Time
AvailableBytes uint64
TotalBytes uint64
// contains filtered or unexported fields
}
Workspace represents a temporary file storage location with its performance characteristics
func (*Workspace) GetAvailableBytes ¶
GetAvailableBytes returns the currently known available space (thread-safe)
func (*Workspace) UpdateCapacity ¶
UpdateCapacity checks the available disk space for this workspace