|
@@ -35,13 +35,13 @@ type OssConfig struct {
|
|
|
|
|
|
// mysql 配置
|
|
|
type MysqlConfig struct {
|
|
|
- User string `json:"user"`
|
|
|
- Password string `json:"password"`
|
|
|
- Addr string `json:"addr"`
|
|
|
+ User string `json:"user"`
|
|
|
+ Password string `json:"password"`
|
|
|
+ Addr string `json:"addr"`
|
|
|
Db string `json:"db"`
|
|
|
- Charset string `json:"charset"`
|
|
|
- MaxIdle json.Number `json:"max_idle"`
|
|
|
- MaxConn json.Number `json:"max_conn"`
|
|
|
+ Charset string `json:"charset"`
|
|
|
+ MaxIdle json.Number `json:"max_idle"`
|
|
|
+ MaxConn json.Number `json:"max_conn"`
|
|
|
}
|
|
|
|
|
|
type MongoConfig struct {
|
|
@@ -54,7 +54,7 @@ type MongoConfig struct {
|
|
|
type RedisConfig struct {
|
|
|
Addrs string `json:"addrs"`
|
|
|
Password string `json:"password"`
|
|
|
- Db json.Number `json:"db"`
|
|
|
+ Db json.Number `json:"db"`
|
|
|
PoolSize json.Number `json:"pool_size"`
|
|
|
MinIdleConns json.Number `json:"min_idle_conns"`
|
|
|
MaxRetries json.Number `json:"max_retries"`
|
|
@@ -77,7 +77,7 @@ type LogConfig struct {
|
|
|
|
|
|
type RPCNode struct {
|
|
|
ServiceName string `json:"service_name"`
|
|
|
- ServicePort string `json:"service_port"`
|
|
|
+ ServicePort string `json:"service_port"`
|
|
|
ServiceIp string `json:"service_ip"`
|
|
|
MysqlDb string `json:"mysql_db"`
|
|
|
RedisDb json.Number `json:"redis_db"`
|
|
@@ -88,20 +88,20 @@ type RPCNode struct {
|
|
|
type RPCConfig struct {
|
|
|
Prefix string
|
|
|
Keepalive KeepaliveConfig
|
|
|
- AdmDws RPCNode `json:"adm_dws"`
|
|
|
- AdmOds RPCNode `json:"adm_ods"`
|
|
|
- AdmAds RPCNode `json:"adm_ads"`
|
|
|
+ AdmDws RPCNode `json:"adm_dws"`
|
|
|
+ AdmOds RPCNode `json:"adm_ods"`
|
|
|
+ // AdmAds RPCNode `json:"adm_ads"`
|
|
|
AdmTask RPCNode `json:"adm_task"`
|
|
|
}
|
|
|
|
|
|
type RabbitmqConfig struct {
|
|
|
- Addr string `json:"addr"`
|
|
|
- Username string `json:"username"`
|
|
|
- Passwrod string `json:"passwrod"`
|
|
|
- Vhost string `json:"vhost"`
|
|
|
- ExchangeName string `json:"exchange_name"`
|
|
|
- QueueName string `json:"queue_name"`
|
|
|
- RouteBindKey string `json:"route_bind_key"`
|
|
|
+ Addr string `json:"addr"`
|
|
|
+ Username string `json:"username"`
|
|
|
+ Passwrod string `json:"passwrod"`
|
|
|
+ Vhost string `json:"vhost"`
|
|
|
+ ExchangeName string `json:"exchange_name"`
|
|
|
+ QueueName string `json:"queue_name"`
|
|
|
+ RouteBindKey string `json:"route_bind_key"`
|
|
|
ConsumerCount json.Number `json:"consumer_count"`
|
|
|
}
|
|
|
|
|
@@ -119,6 +119,7 @@ type Configure struct {
|
|
|
AdsRabbitmq RabbitmqConfig `json:"ads_rabbitmq"`
|
|
|
Md5Rabbitmq RabbitmqConfig `json:"md5_rabbitmq"`
|
|
|
}
|
|
|
+
|
|
|
/*
|
|
|
func watchEtcd(keysAPI client.KeysAPI, index uint64, runmode, key string, cli client.Client) {
|
|
|
basePath := fmt.Sprintf("/%s/config", runmode)
|