feat user服部署
This commit is contained in:
@@ -30,11 +30,11 @@ type EtcdConfig struct {
|
||||
|
||||
type MySQLConfig struct {
|
||||
Dsn string `yaml:"dsn"`
|
||||
MaxOpenConn int32 `yaml:"max_open_conn"`
|
||||
MaxIdleConn int32 `yaml:"max_idle_conn"`
|
||||
ConnMaxLifetimeSec int32 `yaml:"conn_max_lifetime_sec"`
|
||||
ConnMaxIdleTimeSec int32 `yaml:"conn_max_idle_time_sec"`
|
||||
LogLevel string `yaml:"log_level"`
|
||||
MaxOpenConn int32 `yaml:"maxOpenConn"`
|
||||
MaxIdleConn int32 `yaml:"maxIdleConn"`
|
||||
ConnMaxLifetimeSec int32 `yaml:"connMaxLifetimeSec"`
|
||||
ConnMaxIdleTimeSec int32 `yaml:"connMaxIdleTimeSec"`
|
||||
LogLevel string `yaml:"logLevel"`
|
||||
}
|
||||
|
||||
type ServeConfig struct {
|
||||
|
||||
@@ -19,16 +19,16 @@ db:
|
||||
|
||||
serve:
|
||||
grpc:
|
||||
address: "127.0.0.1"
|
||||
address: "10.0.40.199"
|
||||
port: 8500
|
||||
ttl: 20
|
||||
socket:
|
||||
web:
|
||||
address: "127.0.0.1"
|
||||
address: "0.0.0.0"
|
||||
port: 8501
|
||||
raw:
|
||||
address: "127.0.0.1"
|
||||
address: "0.0.0.0"
|
||||
port: 8502
|
||||
http:
|
||||
address: "127.0.0.1"
|
||||
address: "0.0.0.0"
|
||||
port: 8503
|
||||
|
||||
@@ -24,11 +24,11 @@ serve:
|
||||
ttl: 20
|
||||
socket:
|
||||
web:
|
||||
address: "127.0.0.1"
|
||||
address: "0.0.0.0"
|
||||
port: 8501
|
||||
raw:
|
||||
address: "127.0.0.1"
|
||||
address: "0.0.0.0"
|
||||
port: 8502
|
||||
http:
|
||||
address: "127.0.0.1"
|
||||
address: "0.0.0.0"
|
||||
port: 8503
|
||||
|
||||
@@ -33,7 +33,7 @@ func ErrorHandler(_ context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, w
|
||||
code = http_resp.Failed.Code()
|
||||
msg = http_resp.Failed.Error()
|
||||
}
|
||||
if st.Code() == codes.Unknown {
|
||||
if st.Code() == codes.Unknown || st.Code() == codes.Unimplemented {
|
||||
msg = st.Message()
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ func grpcCodeToHTTPCode(c codes.Code) int {
|
||||
switch c {
|
||||
case codes.OK, codes.Unknown:
|
||||
return http.StatusOK
|
||||
case codes.Unimplemented:
|
||||
return http.StatusNotFound
|
||||
default:
|
||||
return http.StatusInternalServerError
|
||||
}
|
||||
|
||||
@@ -14,6 +14,6 @@ db:
|
||||
|
||||
serve:
|
||||
grpc:
|
||||
address: "127.0.0.1"
|
||||
address: "10.0.40.199"
|
||||
port: 8601
|
||||
ttl: 20
|
||||
|
||||
@@ -14,14 +14,14 @@ db:
|
||||
mysql:
|
||||
user_db:
|
||||
dsn: "root:gR9pV4tY7zR6qL3e@tcp(47.108.184.184:3306)/user_db?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
max_open_conn: 50
|
||||
max_idle_conn: 20
|
||||
conn_max_lifetime_sec: 600
|
||||
conn_max_idle_time_sec: 180
|
||||
log_level: "warn"
|
||||
maxOpenConn: 50
|
||||
maxIdleConn: 20
|
||||
connMaxLifetimeSec: 600
|
||||
connMaxIdleTimeSec: 180
|
||||
logLevel: "warn"
|
||||
|
||||
serve:
|
||||
grpc:
|
||||
address: "127.0.0.1"
|
||||
address: "10.0.40.199"
|
||||
port: 8602
|
||||
ttl: 20
|
||||
|
||||
@@ -13,12 +13,12 @@ db:
|
||||
endpoints: [ "172.18.28.0:2379" ]
|
||||
mysql:
|
||||
user_db:
|
||||
dsn: "root:gR9pV4tY7zR6qL3e@tcp(47.108.184.184:3306)/user_db?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
max_open_conn: 50
|
||||
max_idle_conn: 20
|
||||
conn_max_lifetime_sec: 600
|
||||
conn_max_idle_time_sec: 180
|
||||
log_level: "warn"
|
||||
dsn: "root:gR9pV4tY7zR6qL3e@tcp(172.18.28.0:3306)/user_db?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
maxOpenConn: 50
|
||||
maxIdleConn: 20
|
||||
connMaxLifetimeSec: 600
|
||||
connMaxIdleTimeSec: 180
|
||||
logLevel: "warn"
|
||||
|
||||
serve:
|
||||
grpc:
|
||||
|
||||
Reference in New Issue
Block a user