Skip to content

Commit

Permalink
fix(service): missing connection info (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serpentiel authored May 14, 2024
1 parent a196472 commit b1673a5
Showing 1 changed file with 65 additions and 31 deletions.
96 changes: 65 additions & 31 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,54 +107,88 @@ type (

// ConnectionInfo represents the Service Connection information on Aiven.
ConnectionInfo struct {
CassandraHosts []string `json:"cassandra"`
// Common
Direct []string `json:"direct"`
LetsEncrypt bool `json:"letsencrypt"`

// Kafka
KafkaHosts []string `json:"kafka"` // TODO: Rename to KafkaURIs in the next major version.
KafkaAccessCert string `json:"kafka_access_cert"`
KafkaAccessKey string `json:"kafka_access_key"`
KafkaConnectURI string `json:"kafka_connect_uri"`
KafkaRestURI string `json:"kafka_rest_uri"`
SchemaRegistryURI string `json:"schema_registry_uri"`

// PostgreSQL
PostgresURIs []string `json:"pg"`
PostgresBouncer string `json:"pg_bouncer"`
PostgresParams []PostgresParams `json:"pg_params"`
PostgresReplicaURI string `json:"pg_replica_uri"`
PostgresStandbyURIs []string `json:"pg_standby"`
PostgresSyncingURIs string `json:"pg_syncing"`

// Thanos
ThanosURIs []string `json:"thanos"`
QueryFrontendURI string `json:"query_frontend_uri"`
QueryURI string `json:"query_uri"`
ReceiverIngestingRemoteWriteURI string `json:"receiver_ingesting_remote_write_uri"`
ReceiverRemoteWriteURI string `json:"receiver_remote_write_uri"`
StoreURI string `json:"store_uri"`

// MySQL
MySQLURIs []string `json:"mysql"`
MySQLParams []MySQLParams `json:"mysql_params"`
MySQLReplicaURI string `json:"mysql_replica_uri"`
MySQLStandbyURIs []string `json:"mysql_standby"`

// ElasticSearch
ElasticsearchURIs []string `json:"elasticsearch"`
ElasticsearchUsername string `json:"elasticsearch_username"`
ElasticsearchPassword string `json:"elasticsearch_password"`
KibanaURI string `json:"kibana_uri"`
ElasticsearchUsername string `json:"elasticsearch_username"`
KibanaURI string `json:"kibana_uri"` // This field is available in OpenSearch as well.

// OpenSearch
// TODO: Rename Opensearch to OpenSearch in the next major version.
OpensearchURIs []string `json:"opensearch"`
OpensearchDashboardsURI string `json:"opensearch_dashboards_uri"`
OpensearchPassword string `json:"opensearch_password"`
OpensearchUsername string `json:"opensearch_username"`
OpensearchPassword string `json:"opensearch_password"`

GrafanaURIs []string `json:"grafana"`
// Cassandra
CassandraHosts []string `json:"cassandra"` // TODO: Rename to CassandraURIs in the next major version.

// Redis and Dragonfly
RedisURIs []string `json:"redis"`
RedisSlaveURIs []string `json:"redis_slave"`
RedisReplicaURI string `json:"redis_replica_uri"`
RedisPassword string `json:"redis_password"`

// InfluxDB
InfluxDBURIs []string `json:"influxdb"`
InfluxDBDatabaseName string `json:"influxdb_dbname"`
InfluxDBUsername string `json:"influxdb_username"`
InfluxDBPassword string `json:"influxdb_password"`
InfluxDBDatabaseName string `json:"influxdb_dbname"`

KafkaHosts []string `json:"kafka"`
KafkaAccessCert string `json:"kafka_access_cert"`
KafkaAccessKey string `json:"kafka_access_key"`
KafkaConnectURI string `json:"kafka_connect_uri"`
KafkaRestURI string `json:"kafka_rest_uri"`
SchemaRegistryURI string `json:"schema_registry_uri"`

PostgresParams []PostgresParams `json:"pg_params"`
PostgresReplicaURI string `json:"pg_replica_uri"`
PostgresStandbyURIs []string `json:"pg_standby"`
PostgresURIs []string `json:"pg"`
// Grafana
GrafanaURIs []string `json:"grafana"`

RedisPassword string `json:"redis_password"`
RedisSlaveURIs []string `json:"redis_slave"`
RedisURIs []string `json:"redis"`
// M3DB
M3DBURIs []string `json:"m3db"`
HTTPClusterURI string `json:"http_cluster_uri"`
HTTPNodeURI string `json:"http_node_uri"`
InfluxDBURI string `json:"influxdb_uri"`
PrometheusRemoteReadURI string `json:"prometheus_remote_read_uri"`
PrometheusRemoteWriteURI string `json:"prometheus_remote_write_uri"`

FlinkHostPorts []string `json:"flink"`
// M3 Aggregator
M3AggregatorURIs []string `json:"m3aggregator"`
AggregatorHTTPURI string `json:"aggregator_http_uri"`

MySQLURIs []string `json:"mysql"`
MySQLParams []MySQLParams `json:"mysql_params"`
MySQLReplicaURI string `json:"mysql_replica_uri"`
MySQLStandbyURIs []string `json:"mysql_standby"`
// ClickHouse
ClickHouseURIs []string `json:"clickhouse"`

// Thanos
QueryFrontendURI string `json:"query_frontend_uri"`
QueryURI string `json:"query_uri"`
ReceiverIngestingRemoteWriteURI string `json:"receiver_ingesting_remote_write_uri"`
ReceiverRemoteWriteURI string `json:"receiver_remote_write_uri"`
StoreURI string `json:"store_uri"`
// Flink
FlinkHostPorts []string `json:"flink"` // TODO: Rename to FlinkURIs in the next major version.
}

// PostgresParams represents individual parameters for a PostgreSQL ConnectionInfo
Expand Down

0 comments on commit b1673a5

Please sign in to comment.