Documentation
¶
Overview ¶
Package debugserver hosts the opt-in profiling endpoint.
It exists because of what `http.ListenAndServe(addr, nil)` does not do. That call serves the process-wide default mux and returns only when the server fails, so there was no server value to shut down and no way to say when it had stopped. Turning pprof off in the config did not close the listener that was already running: the reload built the next generation while the previous one still held 127.0.0.1:6060, and if that generation had profiling on too, it raced the port and lost.
Serving the default mux is its own problem. Any package anywhere in the build that registers a handler in an init function — which is exactly how net/http/pprof itself works — becomes reachable on the profiling port without anyone deciding that it should be. The handlers here are named one by one instead, so what is on this port is what this file says is on it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.