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

@@ -11,7 +11,7 @@ import (
"strings"
"time"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins"
"github.com/influxdata/telegraf/internal"
"github.com/influxdata/telegraf/plugins/inputs"
)
@@ -39,7 +39,7 @@ func (*Sensors) SampleConfig() string {
}
func (s *Sensors) Gather(acc telegraf.Accumulator) error {
func (s *Sensors) Gather(acc plugins.Accumulator) error {
if len(s.path) == 0 {
return errors.New("sensors not found: verify that lm-sensors package is installed and that sensors is in your PATH")
}
@@ -49,8 +49,8 @@ func (s *Sensors) Gather(acc telegraf.Accumulator) error {
// parse forks the command:
// sensors -u -A
// and parses the output to add it to the telegraf.Accumulator.
func (s *Sensors) parse(acc telegraf.Accumulator) error {
// and parses the output to add it to the plugins.Accumulator.
func (s *Sensors) parse(acc plugins.Accumulator) error {
tags := map[string]string{}
fields := map[string]interface{}{}
chip := ""
@@ -107,7 +107,7 @@ func init() {
if len(path) > 0 {
s.path = path
}
inputs.Add("sensors", func() telegraf.Input {
inputs.Add("sensors", func() plugins.Input {
return &s
})
}