2015-07-10 15:54:15 +00:00
|
|
|
package outputs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/influxdb/influxdb/client"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Output interface {
|
2015-08-07 20:31:25 +00:00
|
|
|
Connect(string) error
|
2015-07-10 15:54:15 +00:00
|
|
|
Write(client.BatchPoints) error
|
|
|
|
}
|
|
|
|
|
|
|
|
type Creator func() Output
|
|
|
|
|
|
|
|
var Outputs = map[string]Creator{}
|
|
|
|
|
|
|
|
func Add(name string, creator Creator) {
|
|
|
|
Outputs[name] = creator
|
|
|
|
}
|