mirror of
https://github.com/moby/moby.git
synced 2025-07-29 07:21:35 +03:00
Network remote APIs using new router, --net=<user-defined-network> changes
* Moving Network Remote APIs out of experimental * --net can now accept user created networks using network drivers/plugins * Removed the experimental services concept and --default-network option * Neccessary backend changes to accomodate multiple networks per container * Integration Tests Signed-off-by: David Calavera <david.calavera@gmail.com> Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
@ -1,15 +1,6 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/docker/docker/api/server/httputils"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
// VersionMatcher defines a variable matcher to be parsed by the router
|
||||
// when a request is about to be served.
|
||||
const VersionMatcher = "/v{version:[0-9.]+}"
|
||||
import "github.com/docker/docker/api/server/httputils"
|
||||
|
||||
// Router defines an interface to specify a group of routes to add the the docker server.
|
||||
type Router interface {
|
||||
@ -18,8 +9,10 @@ type Router interface {
|
||||
|
||||
// Route defines an individual API route in the docker server.
|
||||
type Route interface {
|
||||
// Register adds the handler route to the docker mux.
|
||||
Register(*mux.Router, http.Handler)
|
||||
// Handler returns the raw function to create the http handler.
|
||||
Handler() httputils.APIFunc
|
||||
// Method returns the http method that the route responds to.
|
||||
Method() string
|
||||
// Path returns the subpath where the route responds to.
|
||||
Path() string
|
||||
}
|
||||
|
Reference in New Issue
Block a user