forked from TrueCloudLab/frostfs-node
[#125] ir: Reconfigure pprof and metrics on SIGHUP
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
a181c9e434
commit
800eb5e983
9 changed files with 154 additions and 80 deletions
21
cmd/frostfs-ir/pprof.go
Normal file
21
cmd/frostfs-ir/pprof.go
Normal 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(),
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue