如何开发Input插件
MetricInput 接口定义
// MetricInput ...
type MetricInput interface {
// Init called for init some system resources, like socket, mutex...
// return call interval(ms) and error flag, if interval is 0, use default interval
Init(Context) (int, error)
// Description returns a one-sentence description on the Input
Description() string
// Collect takes in an accumulator and adds the metrics that the Input
// gathers. This is called every "interval"
Collect(Collector) error
}MetricInput 开发
ServiceInput 接口定义
ServiceInput 开发
Last updated