Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StatsSocketHandler ¶
func StatsSocketHandler(sharedDir string, allowedOrigins []string, disableSystemStats bool) http.HandlerFunc
StatsSocketHandler handles WebSocket connections for real-time stats updates It fetches fresh stats from the database and system on each interval and sends them to the client
Types ¶
type ExtendedStats ¶
type ExtendedStats struct {
Downloads int `json:"downloads"`
Requests int `json:"requests"`
Uploads int `json:"uploads"`
BytesUploaded int64 `json:"bytesUploaded"`
BytesDownloaded int64 `json:"bytesDownloaded"`
StartTime time.Time `json:"startTime"`
System *system.SystemStats `json:"system,omitempty"`
}
ExtendedStats contains both database stats and system stats
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.