Adding a Close() function to the Output interface and to the agent
This commit is contained in:
@@ -52,6 +52,11 @@ func (i *InfluxDB) Connect() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (i *InfluxDB) Close() error {
|
||||
// InfluxDB client does not provide a Close() function
|
||||
return nil
|
||||
}
|
||||
|
||||
func (i *InfluxDB) Write(bp client.BatchPoints) error {
|
||||
bp.Database = i.Database
|
||||
if _, err := i.conn.Write(bp); err != nil {
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
type Output interface {
|
||||
Connect() error
|
||||
Close() error
|
||||
Write(client.BatchPoints) error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user