mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-08-14 14:52:58 +02:00
Update README for sinks and rename file
This commit is contained in:
30
sinks/metricSink.go
Normal file
30
sinks/metricSink.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package sinks
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type SinkConfig struct {
|
||||
Host string `json:"host"`
|
||||
Port string `json:"port"`
|
||||
Database string `json:"database"`
|
||||
User string `json:"user"`
|
||||
Password string `json:"password"`
|
||||
Organization string `json:"organization"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
type Sink struct {
|
||||
host string
|
||||
port string
|
||||
user string
|
||||
password string
|
||||
database string
|
||||
organization string
|
||||
}
|
||||
|
||||
type SinkFuncs interface {
|
||||
Init(config SinkConfig) error
|
||||
Write(measurement string, tags map[string]string, fields map[string]interface{}, t time.Time) error
|
||||
Close()
|
||||
}
|
Reference in New Issue
Block a user