metric

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 2 Imported by: 25

Documentation

Index

Constants

View Source
const (
	ConfigTypeBool   = "bool"
	ConfigTypeArray  = "array"
	ConsifTypeString = "string"

	OptionString     = "options"
	AttributesString = "attributes"
	Timestamp        = "timestamp"
)

Variables

View Source
var Collectors = map[string]Creator{}

Functions

func Add

func Add(name string, creator Creator)

func GetMetricOptions added in v1.3.6

func GetMetricOptions() map[string][]Option

func GetMetricTags added in v1.4.0

func GetMetricTags() map[string][]string

func GetMetricTypeKey added in v1.3.6

func GetMetricTypeKey() map[string][]KeyValue

func GetMetricUsages added in v1.3.6

func GetMetricUsages() []Option

Types

type Collector

type Collector interface {
	Name() string
	Tags() []string
	Usages() string
	Config() map[string]interface{}
	Collect() ([]map[string]interface{}, error)
}

Collector 收集metric�s的接口

type Creator

type Creator func() Collector

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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