commons-go/config/external/influxdb.go

26 lines
1.3 KiB
Go
Raw Normal View History

2018-05-11 10:27:33 +00:00
package external
import "time"
type InfluxDB struct {
2018-05-11 10:36:30 +00:00
ClientConfigs map[string]*InfluxDBClientConfig `json:"clientConfigs" yaml:"clientConfigs" toml:"clientConfigs"`
2018-05-11 10:27:33 +00:00
BatchPointsConfigs map[string]*InfluxDBBatchPointsConfig `json:"batchPointsConfigs" yaml:"batchPointsConfigs" toml:"batchPointsConfigs"`
}
2018-05-11 10:36:30 +00:00
type InfluxDBClientConfig struct {
2018-05-11 10:37:08 +00:00
ClientType string `json:"clientType" yaml:"clientType" toml:"clientType"`
Address string `json:"address" yaml:"address" toml:"address"`
Username string `json:"username" yaml:"username" toml:"username"`
Password string `json:"password" yaml:"password" toml:"password"`
UserAgent string `json:"userAgent" yaml:"userAgent" toml:"userAgent"`
Timeout time.Duration `json:"timeout" yaml:"timeout" toml:"timeout"`
PayloadSize int `json:"payloadSize" yaml:"payloadSize" toml:"payloadSize"`
2018-05-11 10:27:33 +00:00
}
type InfluxDBBatchPointsConfig struct {
Precision string `json:"precision" yaml:"precision" toml:"precision"`
Database string `json:"database" yaml:"database" toml:"database"`
RetentionPolicy string `json:"retentionPolicy" yaml:"retentionPolicy" toml:"retentionPolicy"`
WriteConsistency string `json:"writeConsistency" yaml:"writeConsistency" toml:"writeConsistency"`
}