stats

package
v0.0.0-...-8c606a7 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Servers map[string]Server

Functions

func CloseHandler

func CloseHandler(code int, text string) error

Close handler, begin chain of escalation.

func Handler

func Handler() common.Handler

Handles individual connections, parsing JSON data from client and writing a message.

func SetOffline

func SetOffline(hostname string) error

func WriteStats

func WriteStats(hostname string, stats UsageStats) error

Types

type Server

type Server struct {
	Stats  UsageStats `json:"stats"`
	Online bool       `json:"online"`
}

type UsageStats

type UsageStats struct {
	Hostname string  `json:"hostname"`
	Cpu      float64 `json:"cpu"`
	Memory   float64 `json:"memory"`
	Disk     float64 `json:"disk"`
	Secret   string  `json:"secret"`
}

Jump to

Keyboard shortcuts

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