MSP-4680 add clearPeriod & lastUseThreshold params to remote config
This commit is contained in:
1 parent
2a2d07dc3d
commit
91f8e40e70
2 files changed
+12
-2
No files matched your search
@@ -5,5 +5,9 @@
|
||||
"password": "",
|
||||
"db": 0,
|
||||
"prefix": "isp-lock-service"
|
||||
},
|
||||
"inMemLimiter": {
|
||||
"lastUseThresholdInSec": 10,
|
||||
"clearPeriodInSec": 60
|
||||
}
|
||||
}
|
||||
+8
-2
@@ -17,8 +17,9 @@ func init() {
|
||||
}
|
||||
|
||||
type Remote struct {
|
||||
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
|
||||
Redis Redis `schema:"Настройки redis"`
|
||||
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
|
||||
Redis Redis `schema:"Настройки redis"`
|
||||
InMemLimiter InMemLimiter `schema:"Настройка rate limiter в оперативной памяти"`
|
||||
}
|
||||
|
||||
type Redis struct {
|
||||
@@ -37,3 +38,8 @@ type RedisSentinel struct {
|
||||
Username string `schema:"Имя пользователя в sentinel"`
|
||||
Password string `schema:"Пароль в sentinel"`
|
||||
}
|
||||
|
||||
type InMemLimiter struct {
|
||||
ClearPeriodInSec int `validate:"required,min=1" schema:"Интервал очистки неиспользуемых лимитеров в секундах"`
|
||||
LastUseThresholdInSec int `validate:"required,min=1" schema:"Пороговое значение в секундах, после которого лимитер считается неиспользуемым"`
|
||||
}
|
||||
Reference in new issue
Block a user