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:
Cameron Sparr
2017-02-04 15:58:02 +00:00
parent 9726ecfec3
commit 2eee1b84fb
124 changed files with 124 additions and 122 deletions

View File

@@ -0,0 +1,13 @@
package outputs
import (
"github.com/influxdata/telegraf"
)
type Creator func() telegraf.Output
var Outputs = map[string]Creator{}
func Add(name string, creator Creator) {
Outputs[name] = creator
}