Merge pull request #116 from prometheus/refactor/dependencies/update-client-api

Update to use new default handler.
This commit is contained in:
Matt T. Proud 2013-04-02 06:58:23 -07:00
commit 25fa3af0e4

View file

@ -32,11 +32,10 @@ var (
func StartServing(appState *appstate.ApplicationState) { func StartServing(appState *appstate.ApplicationState) {
gorest.RegisterService(api.NewMetricsService(appState)) gorest.RegisterService(api.NewMetricsService(appState))
exporter := registry.DefaultRegistry.YieldExporter()
http.Handle("/status", &StatusHandler{appState: appState}) http.Handle("/status", &StatusHandler{appState: appState})
http.Handle("/api/", gorest.Handle()) http.Handle("/api/", gorest.Handle())
http.Handle("/metrics.json", exporter) http.Handle("/metrics.json", registry.DefaultHandler)
if *useLocalAssets { if *useLocalAssets {
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static")))) http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static"))))
} else { } else {