telegraf/outputs/registry.go

22 lines
337 B
Go
Raw Normal View History

package outputs
import (
"github.com/influxdb/influxdb/client"
)
type Output interface {
Connect() error
Close() error
Description() string
SampleConfig() string
Write(client.BatchPoints) error
}
type Creator func() Output
var Outputs = map[string]Creator{}
func Add(name string, creator Creator) {
Outputs[name] = creator
}