common

package
v0.0.0-...-b56887b Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package common provides some common functionality for the wavepipe media server.

Index

Constants

This section is empty.

Variables

View Source
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

func ExpandHomeDir(path string) string

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

func UNIXtoRFC1123(unix int64) string

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

Jump to

Keyboard shortcuts

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