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 (
"reflect"
"strings"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins"
"github.com/influxdata/telegraf/plugins/inputs"
)
@@ -83,7 +83,7 @@ func (pa *PuppetAgent) Description() string {
}
// Gather reads stats from all configured servers accumulates stats
func (pa *PuppetAgent) Gather(acc telegraf.Accumulator) error {
func (pa *PuppetAgent) Gather(acc plugins.Accumulator) error {
if len(pa.Location) == 0 {
pa.Location = "/var/lib/puppet/state/last_run_summary.yaml"
@@ -111,7 +111,7 @@ func (pa *PuppetAgent) Gather(acc telegraf.Accumulator) error {
return nil
}
func structPrinter(s *State, acc telegraf.Accumulator, tags map[string]string) {
func structPrinter(s *State, acc plugins.Accumulator, tags map[string]string) {
e := reflect.ValueOf(s).Elem()
fields := make(map[string]interface{})
@@ -132,7 +132,7 @@ func structPrinter(s *State, acc telegraf.Accumulator, tags map[string]string) {
}
func init() {
inputs.Add("puppetagent", func() telegraf.Input {
inputs.Add("puppetagent", func() plugins.Input {
return &PuppetAgent{}
})
}