This will basically make the root directory a place for storing the major telegraf interfaces, which will make telegraf's godoc looks quite a bit nicer. And make it easier for contributors to lookup the few data types that they actually care about. closes #564
12 lines
195 B
Go
12 lines
195 B
Go
package inputs
|
|
|
|
import "github.com/influxdata/telegraf"
|
|
|
|
type Creator func() telegraf.Input
|
|
|
|
var Inputs = map[string]Creator{}
|
|
|
|
func Add(name string, creator Creator) {
|
|
Inputs[name] = creator
|
|
}
|