[#125] ir: Reconfigure pprof and metrics on SIGHUP

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-04-26 15:45:57 +03:00
parent a181c9e434
commit 800eb5e983
9 changed files with 154 additions and 80 deletions

21
cmd/frostfs-ir/pprof.go Normal file
View file

@ -0,0 +1,21 @@
package main
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(),
}
}