move plugin interfaces into separate package

This commit is contained in:
David Norton
2016-12-23 10:18:27 -05:00
parent 3e6c4a53a4
commit 81caa56859
182 changed files with 817 additions and 817 deletions

View File

@@ -8,7 +8,7 @@ import (
"strings"
"github.com/amir/raidman"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins"
"github.com/influxdata/telegraf/plugins/outputs"
)
@@ -61,7 +61,7 @@ func (r *Riemann) Description() string {
return "Configuration for the Riemann server to send metrics to"
}
func (r *Riemann) Write(metrics []telegraf.Metric) error {
func (r *Riemann) Write(metrics []plugins.Metric) error {
log.Printf(deprecationMsg)
if len(metrics) == 0 {
return nil
@@ -92,7 +92,7 @@ func (r *Riemann) Write(metrics []telegraf.Metric) error {
return nil
}
func buildEvents(p telegraf.Metric, s string) []*raidman.Event {
func buildEvents(p plugins.Metric, s string) []*raidman.Event {
events := []*raidman.Event{}
for fieldName, value := range p.Fields() {
host, ok := p.Tags()["host"]
@@ -150,7 +150,7 @@ func serviceName(s string, n string, t map[string]string, f string) string {
}
func init() {
outputs.Add("riemann", func() telegraf.Output {
outputs.Add("riemann", func() plugins.Output {
return &Riemann{}
})
}