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

@@ -7,7 +7,7 @@ import (
"net"
"time"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins"
"github.com/influxdata/telegraf/plugins/inputs"
)
@@ -32,7 +32,7 @@ func (t *Twemproxy) Description() string {
}
// Gather data from all Twemproxy instances
func (t *Twemproxy) Gather(acc telegraf.Accumulator) error {
func (t *Twemproxy) Gather(acc plugins.Accumulator) error {
conn, err := net.DialTimeout("tcp", t.Addr, 1*time.Second)
if err != nil {
return err
@@ -56,7 +56,7 @@ func (t *Twemproxy) Gather(acc telegraf.Accumulator) error {
// Process Twemproxy server stats
func (t *Twemproxy) processStat(
acc telegraf.Accumulator,
acc plugins.Accumulator,
tags map[string]string,
data map[string]interface{},
) {
@@ -90,7 +90,7 @@ func (t *Twemproxy) processStat(
// Process pool data in Twemproxy stats
func (t *Twemproxy) processPool(
acc telegraf.Accumulator,
acc plugins.Accumulator,
tags map[string]string,
data map[string]interface{},
) {
@@ -118,7 +118,7 @@ func (t *Twemproxy) processPool(
// Process backend server(redis/memcached) stats
func (t *Twemproxy) processServer(
acc telegraf.Accumulator,
acc plugins.Accumulator,
tags map[string]string,
data map[string]interface{},
) {
@@ -144,7 +144,7 @@ func copyTags(tags map[string]string) map[string]string {
}
func init() {
inputs.Add("twemproxy", func() telegraf.Input {
inputs.Add("twemproxy", func() plugins.Input {
return &Twemproxy{}
})
}