mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
33 lines
965 B
Go
33 lines
965 B
Go
package clickhouse
|
|
|
|
import (
|
|
"akvorado/common/clickhousedb"
|
|
"akvorado/common/kafka"
|
|
)
|
|
|
|
// Configuration describes the configuration for the ClickHouse configurator.
|
|
type Configuration struct {
|
|
clickhousedb.Configuration `mapstructure:",squash" yaml:"-,inline"`
|
|
// Kafka describes Kafka-specific configuration
|
|
Kafka KafkaConfiguration
|
|
// OrchestratorURL allows one to override URL to reach orchestrator from Clickhouse
|
|
OrchestratorURL string
|
|
}
|
|
|
|
// KafkaConfiguration describes Kafka-specific configuration
|
|
type KafkaConfiguration struct {
|
|
kafka.Configuration `mapstructure:",squash" yaml:"-,inline"`
|
|
// Consumers tell how many consumers to use to poll data from Kafka
|
|
Consumers int
|
|
}
|
|
|
|
// DefaultConfiguration represents the default configuration for the ClickHouse configurator.
|
|
func DefaultConfiguration() Configuration {
|
|
return Configuration{
|
|
Configuration: clickhousedb.DefaultConfiguration(),
|
|
Kafka: KafkaConfiguration{
|
|
Consumers: 1,
|
|
},
|
|
}
|
|
}
|