[#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 (
httputil "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/http"
)
const (
pprofEnabledKey = "pprof.enabled"
pprofAddressKey = "pprof.address"
pprofShutdownTimeoutKey = "pprof.shutdown_timeout"
)
func newPprofComponent() *httpComponent {
return &httpComponent{
name: "pprof",
enabledKey: pprofEnabledKey,
addressKey: pprofAddressKey,
shutdownTimeoutKey: pprofShutdownTimeoutKey,
handler: httputil.Handler(),
name: "pprof",
handler: httputil.Handler(),
}
}