stats

package
v0.0.0-...-49d3f61 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CpuResponse

type CpuResponse struct {
	Times []cpu.TimesStat `json:"times"`
	Info  []cpu.InfoStat  `json:"info"`
}

type MemoryResponse

type MemoryResponse struct {
	Memory *mem.VirtualMemoryStat `json:"memory"`
	Swap   *mem.SwapMemoryStat    `json:"swap"`
}

type NetResult

type NetResult struct {
	Device string `json:"device"`
	TxRate uint64 `json:"tx_rate"`
	RxRate uint64 `json:"rx_rate"`
}

type Stats

type Stats struct {
	plugins.Base
}

func New

func New() *Stats

func (*Stats) Cpu

func (s *Stats) Cpu(args int, res *CpuResponse) error

func (*Stats) DiskSpace

func (s *Stats) DiskSpace(args *StatsArgs, res *StatsResponse) error

func (*Stats) Host

func (s *Stats) Host(args int, res *host.InfoStat) error

func (*Stats) Load

func (s *Stats) Load(args int, res *load.AvgStat) error

func (*Stats) Memory

func (s *Stats) Memory(args *MemoryResponse, res *MemoryResponse) error

func (*Stats) Net

func (s *Stats) Net(args int, res *[]*NetResult) error

func (*Stats) RegisterRPC

func (self *Stats) RegisterRPC(server *rpc.Server)

type StatsArgs

type StatsArgs struct {
	Mounts []string `json:"mounts"`
}

type StatsResponse

type StatsResponse struct {
	Results []StatsResult `json:"results"`
}

type StatsResult

type StatsResult struct {
	Mount string `json:"mount"`
	Size  uint64 `json:"size"`
	Used  uint64 `json:"used"`
}

Jump to

Keyboard shortcuts

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