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 (
"sync"
"time"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins"
"github.com/influxdata/telegraf/internal/errchan"
"github.com/influxdata/telegraf/plugins/inputs"
)
@@ -55,7 +55,7 @@ const defaultPort = "6379"
// Reads stats from all configured servers accumulates stats.
// Returns one of the errors encountered while gather stats (if any).
func (r *Redis) Gather(acc telegraf.Accumulator) error {
func (r *Redis) Gather(acc plugins.Accumulator) error {
if len(r.Servers) == 0 {
url := &url.URL{
Scheme: "tcp",
@@ -99,7 +99,7 @@ func (r *Redis) Gather(acc telegraf.Accumulator) error {
return errChan.Error()
}
func (r *Redis) gatherServer(addr *url.URL, acc telegraf.Accumulator) error {
func (r *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error {
var address string
if addr.Scheme == "unix" {
@@ -154,7 +154,7 @@ func (r *Redis) gatherServer(addr *url.URL, acc telegraf.Accumulator) error {
// gatherInfoOutput gathers
func gatherInfoOutput(
rdr *bufio.Reader,
acc telegraf.Accumulator,
acc plugins.Accumulator,
tags map[string]string,
) error {
var section string
@@ -256,7 +256,7 @@ func gatherInfoOutput(
func gatherKeyspaceLine(
name string,
line string,
acc telegraf.Accumulator,
acc plugins.Accumulator,
global_tags map[string]string,
) {
if strings.Contains(line, "keys=") {
@@ -279,7 +279,7 @@ func gatherKeyspaceLine(
}
func init() {
inputs.Add("redis", func() telegraf.Input {
inputs.Add("redis", func() plugins.Input {
return &Redis{}
})
}