break telegraf registry into separate package
this is for supporting external plugins. external plugins will depend on a few telegraf interface types, as well as a common telegraf registry. this will allow external and internal plugins to both share this package and make it easier to vendor/version the whole thing semantically, which will make it easier to keep plugins supported across build and telegraf versions. see #1717
This commit is contained in:
11
registry/inputs/registry.go
Normal file
11
registry/inputs/registry.go
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user