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

@@ -1,7 +1,7 @@
package cgroup
import (
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins"
"github.com/influxdata/telegraf/plugins/inputs"
)
@@ -34,5 +34,5 @@ func (g *CGroup) Description() string {
}
func init() {
inputs.Add("cgroup", func() telegraf.Input { return &CGroup{} })
inputs.Add("cgroup", func() plugins.Input { return &CGroup{} })
}

View File

@@ -11,12 +11,12 @@ import (
"regexp"
"strconv"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins"
)
const metricName = "cgroup"
func (g *CGroup) Gather(acc telegraf.Accumulator) error {
func (g *CGroup) Gather(acc plugins.Accumulator) error {
list := make(chan pathInfo)
go g.generateDirs(list)
@@ -32,7 +32,7 @@ func (g *CGroup) Gather(acc telegraf.Accumulator) error {
return nil
}
func (g *CGroup) gatherDir(dir string, acc telegraf.Accumulator) error {
func (g *CGroup) gatherDir(dir string, acc plugins.Accumulator) error {
fields := make(map[string]interface{})
list := make(chan pathInfo)

View File

@@ -3,9 +3,9 @@
package cgroup
import (
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins"
)
func (g *CGroup) Gather(acc telegraf.Accumulator) error {
func (g *CGroup) Gather(acc plugins.Accumulator) error {
return nil
}