collectors

package
v0.0.0-...-2b44270 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 3 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToString

func ConvertToString(result []*MetricResult) string

ConvertToString converts MetricResults into string

Types

type CollectorFnWrapper

type CollectorFnWrapper struct {
	RunFn        CollectorRunner
	PrecheckFn   CollectorPrecheck
	Dependencies []string
	Type         string
}

CollectorFnWrapper is wrapper struct for inventory collectors

type CollectorPrecheck

type CollectorPrecheck func() error

CollectorPrecheck is precheck function for metric or inventory collectors

type CollectorRunner

type CollectorRunner func() ([]byte, error)

CollectorRunner returns inventory by calling run function of invetory collector

type MetricFnWrapper

type MetricFnWrapper struct {
	RunFn        MetricRunner
	PrecheckFn   CollectorPrecheck
	Dependencies []string
	Type         string
}

MetricFnWrapper is wrapper struct for metric collectors

type MetricResult

type MetricResult struct {
	Header   string
	Data     string
	Sufix    string
	Metadata map[string]string
}

MetricResult represents a metric (example cpu)

func BuildMetricResult

func BuildMetricResult(header, metric, sufix string, metadata map[string]string) *MetricResult

BuildMetricResult returns MetricResult from given header, metric etc

type MetricRunner

type MetricRunner func() ([]*MetricResult, error)

MetricRunner returns metric by calling run function of metric collector

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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