-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: run metrics webserver as oklog/run routine and do it better
The old design sucked. It was an internal lib that had a setup func for the webserver and handler, and it was just called as a goroutine from main() so that it didn't block, since it was using the default `http.ListenAndServe()`. New design: - runs the HTTP server for metrics/pprof as an oklog/run routine, similar to signal handlers, reload handlers, auto reload timer, manager runner, etc. - sets up an `http.Server` struct for more control over the server, specifically now having access to `s.Shutdown(ctx)` This commit also now frees the way to remove the internal `metrics` package, as all of the functionality has been consumed into main
- Loading branch information
Showing
1 changed file
with
77 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters