pub async fn serve_admin(addr: SocketAddr, extra: Router) -> Result<()>Expand description
Bind an admin HTTP server on addr.
The server serves pprof_router() merged with extra, for example a
/metrics route. This function spawns the server and returns after the
bind.
ยงErrors
Returns an error if the listener cannot bind or the HTTP server fails.