[#108] cmd/neofs-node: Add Policer worker to application

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-10-21 12:28:42 +03:00 committed by Leonard Lyubich
parent 07fe49088c
commit f52f643fe4
2 changed files with 48 additions and 0 deletions

View file

@ -80,6 +80,10 @@ const (
cfgGCQueueSize = "gc.queuesize"
cfgGCQueueTick = "gc.duration.sleep"
cfgGCTimeout = "gc.duration.timeout"
cfgPolicerWorkScope = "policer.work_scope"
cfgPolicerExpRate = "policer.expansion_rate"
cfgPolicerHeadTimeout = "policer.head_timeout"
)
const (
@ -316,6 +320,10 @@ func defaultConfiguration(v *viper.Viper) {
v.SetDefault(cfgGCQueueSize, 1000)
v.SetDefault(cfgGCQueueTick, "5s")
v.SetDefault(cfgGCTimeout, "5s")
v.SetDefault(cfgPolicerWorkScope, 100)
v.SetDefault(cfgPolicerExpRate, 10) // in %
v.SetDefault(cfgPolicerHeadTimeout, 5*time.Second)
}
func (c *cfg) LocalAddress() *network.Address {