@@ -16,6 +16,7 @@ const (
1616type Config struct {
1717 Logging LoggingConfig `yaml:"logging"`
1818 Api ApiConfig `yaml:"api"`
19+ Metrics MetricsConfig `yaml:"metrics"`
1920 Debug DebugConfig `yaml:"debug"`
2021 Node NodeConfig `yaml:"node"`
2122}
@@ -27,15 +28,18 @@ type LoggingConfig struct {
2728type ApiConfig struct {
2829 ListenAddress string `yaml:"address" envconfig:"API_LISTEN_ADDRESS"`
2930 ListenPort uint `yaml:"port" envconfig:"API_LISTEN_PORT"`
30- MetricsAddress string `yaml:"metricsAddress" envconfig:"METRICS_LISTEN_ADDRESS"`
31- MetricsPort uint `yaml:"metricsPort" envconfig:"METRICS_LISTEN_PORT"`
3231}
3332
3433type DebugConfig struct {
3534 ListenAddress string `yaml:"address" envconfig:"DEBUG_ADDRESS"`
3635 ListenPort uint `yaml:"port" envconfig:"DEBUG_PORT"`
3736}
3837
38+ type MetricsConfig struct {
39+ ListenAddress string `yaml:"address" envconfig:"METRICS_LISTEN_ADDRESS"`
40+ ListenPort uint `yaml:"port" envconfig:"METRICS_LISTEN_PORT"`
41+ }
42+
3943type NodeConfig struct {
4044 Network string `yaml:"network" envconfig:"NETWORK"`
4145 NetworkMagic uint32 `yaml:"networkMagic" envconfig:"CARDANO_NODE_NETWORK_MAGIC"`
@@ -52,13 +56,15 @@ var globalConfig = &Config{
5256 Api : ApiConfig {
5357 ListenAddress : "" ,
5458 ListenPort : 8090 ,
55- MetricsAddress : "" ,
56- MetricsPort : 8081 ,
5759 },
5860 Debug : DebugConfig {
5961 ListenAddress : "localhost" ,
6062 ListenPort : 0 ,
6163 },
64+ Metrics : MetricsConfig {
65+ ListenAddress : "" ,
66+ ListenPort : 8081 ,
67+ },
6268 Node : NodeConfig {
6369 Network : "mainnet" ,
6470 SocketPath : "/node-ipc/node.socket" ,
0 commit comments