forked from TrueCloudLab/frostfs-node
[#2159] node: Add tree replication timeout configuration
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
edb1428248
commit
306609030a
10 changed files with 36 additions and 3 deletions
|
@ -1,6 +1,10 @@
|
|||
package treeconfig
|
||||
|
||||
import "github.com/TrueCloudLab/frostfs-node/cmd/frostfs-node/config"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/TrueCloudLab/frostfs-node/cmd/frostfs-node/config"
|
||||
)
|
||||
|
||||
const (
|
||||
subsection = "tree"
|
||||
|
@ -36,6 +40,14 @@ func (c TreeConfig) CacheSize() int {
|
|||
return int(config.IntSafe(c.cfg, "cache_size"))
|
||||
}
|
||||
|
||||
// ReplicationTimeout returns the value of "replication_timeout"
|
||||
// config parameter from the "tree" section.
|
||||
//
|
||||
// Returns `0` if config value is not specified.
|
||||
func (c TreeConfig) ReplicationTimeout() time.Duration {
|
||||
return config.DurationSafe(c.cfg, "replication_timeout")
|
||||
}
|
||||
|
||||
// ReplicationChannelCapacity returns the value of "replication_channel_capacity"
|
||||
// config parameter from the "tree" section.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue