[#493] node: Replace relay config value to node section
Set default value to `false`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f90fc86ec8
commit
d36084c26a
1 changed files with 3 additions and 3 deletions
|
@ -64,6 +64,7 @@ const (
|
||||||
cfgNodeKey = "node.key"
|
cfgNodeKey = "node.key"
|
||||||
cfgBootstrapAddress = "node.address"
|
cfgBootstrapAddress = "node.address"
|
||||||
cfgNodeAttributePrefix = "node.attribute"
|
cfgNodeAttributePrefix = "node.attribute"
|
||||||
|
cfgNodeRelay = "node.relay"
|
||||||
|
|
||||||
// config keys for cfgGRPC
|
// config keys for cfgGRPC
|
||||||
cfgListenAddress = "grpc.endpoint"
|
cfgListenAddress = "grpc.endpoint"
|
||||||
|
@ -96,8 +97,6 @@ const (
|
||||||
|
|
||||||
cfgReplicatorPutTimeout = "replicator.put_timeout"
|
cfgReplicatorPutTimeout = "replicator.put_timeout"
|
||||||
|
|
||||||
cfgReBootstrapRelay = "bootstrap.relay_only"
|
|
||||||
|
|
||||||
cfgObjectPutPoolSize = "pool.object.put.size"
|
cfgObjectPutPoolSize = "pool.object.put.size"
|
||||||
cfgObjectGetPoolSize = "pool.object.get.size"
|
cfgObjectGetPoolSize = "pool.object.get.size"
|
||||||
cfgObjectHeadPoolSize = "pool.object.head.size"
|
cfgObjectHeadPoolSize = "pool.object.head.size"
|
||||||
|
@ -354,7 +353,7 @@ func initCfg(path string) *cfg {
|
||||||
reputationWorkerPool, err := ants.NewPool(notificationHandlerPoolSize)
|
reputationWorkerPool, err := ants.NewPool(notificationHandlerPoolSize)
|
||||||
fatalOnErr(err)
|
fatalOnErr(err)
|
||||||
|
|
||||||
relayOnly := viperCfg.GetBool(cfgReBootstrapRelay)
|
relayOnly := viperCfg.GetBool(cfgNodeRelay)
|
||||||
|
|
||||||
c := &cfg{
|
c := &cfg{
|
||||||
ctx: context.Background(),
|
ctx: context.Background(),
|
||||||
|
@ -431,6 +430,7 @@ func initViper(path string) *viper.Viper {
|
||||||
func defaultConfiguration(v *viper.Viper) {
|
func defaultConfiguration(v *viper.Viper) {
|
||||||
v.SetDefault(cfgNodeKey, "") // node key
|
v.SetDefault(cfgNodeKey, "") // node key
|
||||||
v.SetDefault(cfgBootstrapAddress, "") // announced address of the node
|
v.SetDefault(cfgBootstrapAddress, "") // announced address of the node
|
||||||
|
v.SetDefault(cfgNodeRelay, false)
|
||||||
|
|
||||||
v.SetDefault(cfgMorphRPCAddress, []string{})
|
v.SetDefault(cfgMorphRPCAddress, []string{})
|
||||||
v.SetDefault(cfgMorphNotifyRPCAddress, []string{})
|
v.SetDefault(cfgMorphNotifyRPCAddress, []string{})
|
||||||
|
|
Loading…
Reference in a new issue