[#493] cmd/node: Use new config for profiler configuration

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-06-01 14:13:44 +03:00 committed by Alex Vanin
parent 561c809fa5
commit da8310f0e3
2 changed files with 6 additions and 8 deletions

View file

@ -3,12 +3,13 @@ package main
import (
"context"
profilerconfig "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/profiler"
httputil "github.com/nspcc-dev/neofs-node/pkg/util/http"
"go.uber.org/zap"
)
func initProfiler(c *cfg) {
addr := c.viper.GetString(cfgProfilerAddr)
addr := profilerconfig.Address(c.appCfg)
if addr == "" {
return
}
@ -20,7 +21,7 @@ func initProfiler(c *cfg) {
srv := httputil.New(prm,
httputil.WithShutdownTimeout(
c.viper.GetDuration(cfgProfilerShutdownTimeout),
profilerconfig.ShutdownTimeout(c.appCfg),
),
)