[#39] ir: Do not store config keys in httpComponent

Pprof will have specific options, it seems wrong to have them in a
generic struct.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-05-12 11:04:52 +03:00
parent 61776033c2
commit f989bc52be
3 changed files with 22 additions and 37 deletions

View file

@ -4,18 +4,9 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/metrics"
)
const (
prometheusEnabledKey = "prometheus.enabled"
prometheusAddressKey = "prometheus.address"
prometheusShutdownTimeoutKey = "prometheus.shutdown_timeout"
)
func newMetricsComponent() *httpComponent {
return &httpComponent{
name: "prometheus",
enabledKey: prometheusEnabledKey,
addressKey: prometheusAddressKey,
shutdownTimeoutKey: prometheusShutdownTimeoutKey,
handler: metrics.Handler(),
name: "prometheus",
handler: metrics.Handler(),
}
}