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/plugins/inputs"
)
@@ -33,7 +33,7 @@ func (r *Raindrops) Description() string {
return "Read raindrops stats (raindrops - real-time stats for preforking Rack servers)"
}
func (r *Raindrops) Gather(acc telegraf.Accumulator) error {
func (r *Raindrops) Gather(acc plugins.Accumulator) error {
var wg sync.WaitGroup
var outerr error
@@ -55,7 +55,7 @@ func (r *Raindrops) Gather(acc telegraf.Accumulator) error {
return outerr
}
func (r *Raindrops) gatherUrl(addr *url.URL, acc telegraf.Accumulator) error {
func (r *Raindrops) gatherUrl(addr *url.URL, acc plugins.Accumulator) error {
resp, err := r.http_client.Get(addr.String())
if err != nil {
return fmt.Errorf("error making HTTP request to %s: %s", addr.String(), err)
@@ -176,7 +176,7 @@ func (r *Raindrops) getTags(addr *url.URL) map[string]string {
}
func init() {
inputs.Add("raindrops", func() telegraf.Input {
inputs.Add("raindrops", func() plugins.Input {
return &Raindrops{http_client: &http.Client{
Transport: &http.Transport{
ResponseHeaderTimeout: time.Duration(3 * time.Second),