stats

package
v0.0.0-...-11fa281 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Message types
	STAT    = 0
	STATALL = 1

	// Stats
	ALL = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageRequest

type MessageRequest struct {
	Type int `json:"type"`

	StatType int `json:"statType"`
}

type MessageResponse

type MessageResponse struct {
	Host string `json:"host"`

	Nodes Stats `json:"nodes"`

	Error string `json:"error"`
}

type NodeStats

type NodeStats struct {
	Name              string  `json:"name"`
	CPUUsed           float64 `json:"cpuUsed"`
	DiskTotal         uint64  `json:"diskTotal"`
	DiskUsed          uint64  `json:"diskUsed"`
	DiskUsedPercent   float64 `json:"diskUsedPercent"`
	MemoryTotal       uint64  `json:"memoryTotal"`
	MemoryUsed        uint64  `json:"memoryUsed"`
	MemoryUsedPercent float64 `json:"memoryUsedPercent"`
	Error             string  `json:"error"`
}

func GetStats

func GetStats(name string) (NodeStats, error)

type Stats

type Stats map[string]NodeStats

Jump to

Keyboard shortcuts

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