Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Commit

Permalink
feat(pprof): Removing registered pprof listener
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
  • Loading branch information
ViBiOh committed Jun 4, 2021
1 parent 1e946d9 commit 4dfb3e3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cmd/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package main

import (
"flag"
"net/http"
_ "net/http/pprof"
"os"

"github.com/ViBiOh/deploy/pkg/annotation"
Expand All @@ -26,7 +24,6 @@ func main() {

appServerConfig := server.Flags(fs, "", flags.NewOverride("WriteTimeout", "2m"))
promServerConfig := server.Flags(fs, "prometheus", flags.NewOverride("Port", 9090), flags.NewOverride("IdleTimeout", "10s"), flags.NewOverride("ShutdownTimeout", "5s"))
pprofServerConfig := server.Flags(fs, "pprof", flags.NewOverride("Port", 9999))
healthConfig := health.Flags(fs, "")

alcotestConfig := alcotest.Flags(fs, "")
Expand All @@ -46,7 +43,6 @@ func main() {

appServer := server.New(appServerConfig)
promServer := server.New(promServerConfig)
pprofServer := server.New(pprofServerConfig)
prometheusApp := prometheus.New(prometheusConfig)
healthApp := health.New(healthConfig)

Expand All @@ -59,7 +55,6 @@ func main() {

go apiApp.Start(healthApp.Done())

go pprofServer.Start("pprof", healthApp.End(), http.DefaultServeMux)
go promServer.Start("prometheus", healthApp.End(), prometheusApp.Handler())
go appServer.Start("http", healthApp.End(), httputils.Handler(apiApp.Handler(), healthApp, recoverer.Middleware, prometheusApp.Middleware, owasp.New(owaspConfig).Middleware))

Expand Down

0 comments on commit 4dfb3e3

Please sign in to comment.