Beispiel #1
0
func (p pprofHandler) install(r *mux.Router) {
	r.HandleFunc("/debug/pprof/cmdline", httpPprof.Cmdline)
	r.HandleFunc("/debug/pprof/profile", httpPprof.Profile)
	r.HandleFunc("/debug/pprof/symbol", httpPprof.Symbol)
	r.HandleFunc("/debug/pprof/trace", httpPprof.Trace)
	r.HandleFunc("/debug/pprof/{rest:.*}", httpPprof.Index)
}
Beispiel #2
0
func (h *v1Handler) install(r *mux.Router) {
	r.HandleFunc(serverV1StatePath, h.handleHiveState)
	r.HandleFunc(serverV1BeesPath, h.handleBees)
}
Beispiel #3
0
func (w webHandler) install(r *mux.Router) {
	for _, p := range webPages {
		p.page = genPage(p.title, p.script, p.style, p.body)
		r.HandleFunc(p.url, p.handle)
	}
}