Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { Hostname string `json:"hostname"` CPU ServerAttribute `json:"cpu_load"` MemorySize ServerAttribute `json:"memory_size"` MemoryUsage ServerAttribute `json:"memory_usage"` DiskSize ServerAttribute `json:"disk_size"` DiskUsage ServerAttribute `json:"disk_usage"` }
Server is the abstraction of the server object inside a JSON.
type ServerAttribute ¶
ServerAttribute is a server attribute which is encoded in JSON
type ServerCollection ¶
type ServerCollection map[string]*ServerData
ServerCollection maps the hostname of a server to its telemetry data
func Parse ¶
func Parse(folder string) (ServerCollection, error)
Parse reads a folder of JSON files, processing its contents into a ServerCollection.
type ServerData ¶
type ServerData struct { CPU []float64 MemorySize float64 MemoryUsage []float64 DiskSize float64 DiskUsage []float64 CPUStats struct { Mean float64 Mode []float64 } MemoryStats struct { Mean float64 Mode []float64 } DiskStats struct { Mean float64 Mode []float64 } Usage float64 }
ServerData ...
Click to show internal directories.
Click to hide internal directories.