MSP-1388 [v] правки после review
This commit is contained in:
1 parent
e2250121a1
commit
b7a932bfb9
17 files changed
+221
-390
No files matched your search
+2
-2
@@ -4,10 +4,10 @@ configServiceAddress:
|
||||
port: 9001
|
||||
grpcOuterAddress:
|
||||
#ip: 127.0.0.1
|
||||
port: 9999
|
||||
port: 9740
|
||||
grpcInnerAddress:
|
||||
ip: 0.0.0.0
|
||||
port: 9999
|
||||
port: 9740
|
||||
moduleName: isp-lock-service
|
||||
|
||||
logfile:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"logLevel": "debug",
|
||||
"defaultTimeOutInSec": 10,
|
||||
"redis": {
|
||||
"server": "localhost:6379",
|
||||
"address": "localhost:6379",
|
||||
"password": "",
|
||||
"db": 0,
|
||||
"prefix": "isp-lock-service",
|
||||
"defaultTimeOut": 10
|
||||
"prefix": "isp-lock-service"
|
||||
}
|
||||
}
|
||||
+19
-24
@@ -17,30 +17,25 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
// type Remote struct {
|
||||
// // Database dbx.Config
|
||||
// // Consumer Consumer
|
||||
// LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
|
||||
// }
|
||||
type Remote struct {
|
||||
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
|
||||
Redis struct {
|
||||
Server string `schemaGen:"server" schema:"Адрес сервера redis, обязателен, если sentinel не указан"`
|
||||
UserName string `schemaGen:"userName" schema:"Имя пользователя в redis"`
|
||||
Password string `schemaGen:"password" schema:"Пароль для redis"`
|
||||
DB int `schemaGen:"db" schema:"номер БД в redis"`
|
||||
Prefix string `schemaGen:"prefix" schema:"Префикс ключей для модуля"`
|
||||
DefaultTimeOut time.Duration `schemaGen:"defaultTimeOut" schema:"TTL по умолчанию, в секундах"`
|
||||
RedisSentinel *struct {
|
||||
Addresses []string `schema:"Адреса нод в кластере"`
|
||||
MasterName string `schema:"Имя мастера"`
|
||||
Username string `schema:"Имя пользователя в sentinel"`
|
||||
Password string `schema:"Пароль в sentinel"`
|
||||
} `schema:"Настройки sentinel,обязательна, если redis.server не указан"`
|
||||
} `schemaGen:"redis" schema:"Настройки redis"`
|
||||
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
|
||||
Redis Redis `schema:"Настройки redis"`
|
||||
DefaultTimeOutInSec time.Duration `schema:"TTLInSec по умолчанию, в секундах"`
|
||||
}
|
||||
|
||||
// type Consumer struct {
|
||||
// Client grmqx.Connection
|
||||
// Config grmqx.Consumer
|
||||
// }
|
||||
type Redis struct {
|
||||
Address string `schema:"Адрес,обязательное, если sentinel не указан"`
|
||||
Username string `schema:"Имя пользователя"`
|
||||
Password string `schema:"Пароль"`
|
||||
Sentinel *RedisSentinel `schema:"Настройки sentinel,обязательно, если address не указан"`
|
||||
|
||||
DB int `schema:"номер БД в redis"`
|
||||
Prefix string `schema:"Префикс ключей для модуля"`
|
||||
}
|
||||
|
||||
type RedisSentinel struct {
|
||||
Addresses []string `valid:"required" schema:"Адреса нод в кластере"`
|
||||
MasterName string `valid:"required" schema:"Имя мастера"`
|
||||
Username string `schema:"Имя пользователя в sentinel"`
|
||||
Password string `schema:"Пароль в sentinel"`
|
||||
}
|
||||
Reference in new issue
Block a user