config: move metrics.Config into config.BasicService

Config package should be as lightweight as possible and now it depends on the
whole metrics package just to get one structure from it.
This commit is contained in:
Roman Khimov 2022-07-08 19:10:46 +03:00
parent fab8dfb9f8
commit dc59dc991b
6 changed files with 18 additions and 16 deletions

View file

@ -10,7 +10,6 @@ import (
"github.com/nspcc-dev/neo-go/pkg/config"
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
"github.com/nspcc-dev/neo-go/pkg/core/storage"
"github.com/nspcc-dev/neo-go/pkg/network/metrics"
"github.com/nspcc-dev/neo-go/pkg/rpc"
"github.com/stretchr/testify/require"
"github.com/urfave/cli"
@ -317,7 +316,7 @@ func TestConfigureAddresses(t *testing.T) {
t.Run("custom Pprof address", func(t *testing.T) {
cfg := &config.ApplicationConfiguration{
Address: defaultAddress,
Pprof: metrics.Config{
Pprof: config.BasicService{
Address: customAddress,
},
}
@ -330,7 +329,7 @@ func TestConfigureAddresses(t *testing.T) {
t.Run("custom Prometheus address", func(t *testing.T) {
cfg := &config.ApplicationConfiguration{
Address: defaultAddress,
Prometheus: metrics.Config{
Prometheus: config.BasicService{
Address: customAddress,
},
}