modules

package
v0.0.0-...-34adbb6 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2014 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModuleError

func NewModuleError(modulename string, where string, reason string) error

func ReadLines

func ReadLines(filename string) ([]string, error)

Read contents from file and split by new line.

Types

type Aio

type Aio struct {
	Name  string
	Nick  []string
	Vars  []string
	Type  string
	Scale int
}

func (Aio) Check

func (p Aio) Check(conf map[string]map[string]string) error

func (Aio) Extract

func (p Aio) Extract(retchan chan record.Record, conf map[string]map[string]string)

type Cpu

type Cpu struct {
	Name  string
	Nick  []string
	Vars  []string
	Type  string
	Scale int
}

func (Cpu) Check

func (p Cpu) Check(conf map[string]map[string]string) error

func (Cpu) Extract

func (p Cpu) Extract(retchan chan record.Record, conf map[string]map[string]string)

func (Cpu) GetVal

func (p Cpu) GetVal(filename string, vars []string) ([]int, float32, error)

type Disk

type Disk struct {
	Name  string
	Nick  []string
	Vars  []string
	Type  string
	Scale int
}

func (Disk) Check

func (p Disk) Check(conf map[string]map[string]string) error

func (Disk) Extract

func (p Disk) Extract(retchan chan record.Record, conf map[string]map[string]string)

type Load

type Load struct {
	Name  string
	Nick  []string
	Vars  []string
	Type  string
	Scale float32
}

func (Load) Check

func (p Load) Check(conf map[string]map[string]string) error

func (Load) Extract

func (p Load) Extract(retchan chan record.Record, conf map[string]map[string]string)

type Mem

type Mem struct {
	Name  string
	Nick  []string
	Vars  []string
	Type  string
	Scale int
}

func (Mem) Check

func (p Mem) Check(conf map[string]map[string]string) error

func (Mem) Extract

func (p Mem) Extract(retchan chan record.Record, conf map[string]map[string]string)

type ModuleError

type ModuleError struct {
	ModuleName string
	Where      string
	Reason     string
}

func (ModuleError) Error

func (e ModuleError) Error() string

type Plugin

type Plugin interface {
	Check(map[string]map[string]string) error                 // check that resource is available or not
	Extract(chan record.Record, map[string]map[string]string) // get information from that resource

}

func NewAio

func NewAio() Plugin

func NewCpu

func NewCpu() Plugin

func NewDisk

func NewDisk() Plugin

func NewLoad

func NewLoad() Plugin

func NewMem

func NewMem() Plugin

Jump to

Keyboard shortcuts

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