2015-05-20 08:20:19 -04:00
|
|
|
// +build experimental
|
|
|
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
func (s *Server) registerSubRouter() {
|
|
|
|
httpHandler := s.daemon.NetworkApiRouter()
|
|
|
|
|
|
|
|
subrouter := s.router.PathPrefix("/v{version:[0-9.]+}/networks").Subrouter()
|
|
|
|
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
|
|
|
|
subrouter = s.router.PathPrefix("/networks").Subrouter()
|
|
|
|
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
|
2015-06-18 11:41:17 -04:00
|
|
|
|
|
|
|
subrouter = s.router.PathPrefix("/v{version:[0-9.]+}/services").Subrouter()
|
|
|
|
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
|
|
|
|
subrouter = s.router.PathPrefix("/services").Subrouter()
|
|
|
|
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
|
2015-05-20 08:20:19 -04:00
|
|
|
}
|