mod.go 377 B

123456789101112131415161718
  1. // mod is the entry point to all of the etcd modules.
  2. package mod
  3. import (
  4. "net/http"
  5. "github.com/coreos/etcd/mod/dashboard"
  6. "github.com/gorilla/mux"
  7. )
  8. var ServeMux *http.Handler
  9. func HttpHandler() (handler http.Handler) {
  10. modMux := mux.NewRouter()
  11. modMux.PathPrefix("/dashboard/").
  12. Handler(http.StripPrefix("/dashboard/", dashboard.HttpHandler()))
  13. return modMux
  14. }