forked from TrueCloudLab/frostfs-node
[#598] misc: Remove global prefixes
New config package in storage node does not use application prefix from misc package. Therefore inner ring node can define prefix in local scope. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
e50abeab0c
commit
caafd973e4
2 changed files with 3 additions and 10 deletions
|
@ -4,17 +4,18 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/misc"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func newConfig(path string) (*viper.Viper, error) {
|
||||
const innerRingPrefix = "neofs_ir"
|
||||
|
||||
var (
|
||||
err error
|
||||
v = viper.New()
|
||||
)
|
||||
|
||||
v.SetEnvPrefix(misc.InnerRingPrefix)
|
||||
v.SetEnvPrefix(innerRingPrefix)
|
||||
v.AutomaticEnv()
|
||||
v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
package misc
|
||||
|
||||
const (
|
||||
// Prefix is a neofs node application prefix.
|
||||
Prefix = "neofs"
|
||||
|
||||
// InnerRingPrefix is an inner ring application prefix.
|
||||
InnerRingPrefix = "neofs_ir"
|
||||
)
|
||||
|
||||
// These variables are changed in compile time.
|
||||
var (
|
||||
// Build is an application build time.
|
||||
|
|
Loading…
Reference in a new issue