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 GetMetricOptions ¶ added in v1.3.6
func GetMetricOptions() map[string]interface{}
func GetMetricTags ¶ added in v1.4.0
func GetMetricTypeKey ¶ added in v1.3.6
func GetMetricTypeKey() map[string]interface{}
func GetMetricUsages ¶ added in v1.3.6
func GetMetricUsages() []Option
Types ¶
type Collector ¶
type Collector interface { // Name returns the name. Name() string // Tags returns available tags. Tags() []string // Usages returns usage information. Usages() string // Config returns config fields and options. Config() map[string]interface{} // Collect gathers metric infomration. Collect() ([]map[string]interface{}, error) }
Collector 收集metric�s的接口
type ExtCollector ¶ added in v1.5.0
type ExtCollector interface { Collector // SyncConfig updates config options specifically for external metrics. SyncConfig(map[string]interface{}) error }
供外部插件实现 SyncConfig 与 Config 对应 获取配置项后同步配置给插件
Click to show internal directories.
Click to hide internal directories.