telemetry

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Hub       stream.Hub
	Telemetry *telemetry = nil
)

Functions

func Initialize

func Initialize() *telemetry

Types

type Cpu

type Cpu struct {
	Cpuinfo *linuxproc.CPUInfo `json:"cpuinfo"`
	All     float64            `json:"all"`
	Usage   map[int]float64    `json:"usage"`
	// contains filtered or unexported fields
}

func NewCpu

func NewCpu() (cpu *Cpu)

func (*Cpu) Update

func (m *Cpu) Update()

type Devices

type Devices struct {
	Total  int64                         `json:"total"`
	Status map[int64]*models.DeviceState `json:"status"`
}

func (*Devices) Broadcast

func (d *Devices) Broadcast()

func (*Devices) BroadcastOne

func (d *Devices) BroadcastOne(id int64)

func (*Devices) Update

func (d *Devices) Update()

type Disk

type Disk struct {
	DiskStats []linuxproc.DiskStat `json:"disk_stat"`
}

func NewDisk

func NewDisk() (disk *Disk)

func (*Disk) Update

func (d *Disk) Update()

type Flow

type Flow struct {
}

func (*Flow) Update

func (f *Flow) Update()

type Memory

type Memory struct {
	SwapTotal uint64 `json:"swap_total"`
	SwapFree  uint64 `json:"swap_free"`
	MemTotal  uint64 `json:"mem_total"`
	MemFree   uint64 `json:"mem_free"`
}

http://markelov.blogspot.ru/2009/01/linux-procmeminfo.html

func (*Memory) Update

func (m *Memory) Update()

type Nodes

type Nodes struct {
	Total  int64            `json:"total"`
	Status map[int64]string `json:"status"`
}

func NewNode

func NewNode() (node *Nodes)

func (*Nodes) Broadcast

func (n *Nodes) Broadcast()

func (*Nodes) Update

func (n *Nodes) Update()

type Uptime

type Uptime struct {
	Total float64 `json:"total"`
	Idle  float64 `json:"idle"`
}

func (*Uptime) Update

func (u *Uptime) Update() (*Uptime, error)

Jump to

Keyboard shortcuts

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