[#845] node: Configure Object PUT remote and local pools separately

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-09-24 13:50:25 +03:00 committed by Alex Vanin
parent ee20200c2e
commit 0e3e8db5c0
6 changed files with 27 additions and 10 deletions

View file

@ -28,11 +28,23 @@ func Put(c *config.Config) PutConfig {
}
}
// PoolSize returns value of "pool_size" config parameter.
// PoolSizeRemote returns value of "pool_size_remote" config parameter.
//
// Returns PutPoolSizeDefault if value is not positive number.
func (g PutConfig) PoolSize() int {
v := config.Int(g.cfg, "pool_size")
func (g PutConfig) PoolSizeRemote() int {
v := config.Int(g.cfg, "pool_size_remote")
if v > 0 {
return int(v)
}
return PutPoolSizeDefault
}
// PoolSizeLocal returns value of "pool_size_local" config parameter.
//
// Returns PutPoolSizeDefault if value is not positive number.
func (g PutConfig) PoolSizeLocal() int {
v := config.Int(g.cfg, "pool_size_local")
if v > 0 {
return int(v)
}