mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
742db1737c
Signed-off-by: Madhu Venugopal <madhu@docker.com>
17 lines
702 B
Go
17 lines
702 B
Go
// +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)
|
|
|
|
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)
|
|
}
|