Documentation ¶
Overview ¶
Package common provides some common functionality for the wavepipe media server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var System struct { Hostname string User *user.User }
System is a grouped global which stores static information about the host operating system.
Functions ¶
func ExpandHomeDir ¶
ExpandHomeDir replaces input tilde characters with the absolute path to the current user's home directory.
func OSInfo ¶
func OSInfo() *osInfo
OSInfo returns information about the host operating system for this process
func ScanTime ¶
func ScanTime() int64
ScanTime returns the UNIX timestamp of the last time a media scan made changes to the database
func UNIXtoRFC1123 ¶
UNIXtoRFC1123 transforms an input UNIX timestamp into the form specified by RFC1123, using the GMT time zone. This function is used to output Last-Modified headers via HTTP.
func UpdateScanTime ¶
func UpdateScanTime()
UpdateScanTime updates the scanTime to the current UNIX timestamp
Types ¶
type Status ¶
type Status struct { Architecture string `json:"architecture"` Hostname string `json:"hostname"` MemoryMB float64 `json:"memoryMb"` NumCPU int `json:"numCpu"` NumGoroutine int `json:"numGoroutine"` PID int `json:"pid"` Platform string `json:"platform"` Uptime int64 `json:"uptime"` }
Status represents information about the current process, including the basic, static information provided by osInfo
func ServerStatus ¶
func ServerStatus() *Status
ServerStatus returns information about the current process status