Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupPprofHttpServer ¶
SetupPprofHttpServer does two things:
- Because importing "net/http/pprof" automatically binds profiling endpoints to http.DefaultServeMux, this function replaces http.DefaultServeMux with a new mux. This to ensure profiling endpoints are exposed on a separate mux available only from localhost.Hence, this function should be called before adding any other endpoints to http.DefaultServeMux.
- Returns a http server serving net/http/pprof endpoints on localhost:port.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.