mirror of
https://github.com/docker/docs.git
synced 2026-04-01 00:38:52 +07:00
Implement basic interfaces to write custom routers that can be plugged to the server. Remove server coupling with the daemon. Signed-off-by: David Calavera <david.calavera@gmail.com>
21 lines
418 B
Go
21 lines
418 B
Go
// +build !experimental
|
|
|
|
package network
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/docker/docker/api/server/router"
|
|
"github.com/docker/docker/daemon"
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
// NewRouter initializes a new network router
|
|
func NewRouter(d *daemon.Daemon) router.Router {
|
|
return networkRouter{}
|
|
}
|
|
|
|
// Register adds the filtered handler to the mux.
|
|
func (n networkRoute) Register(m *mux.Router, handler http.Handler) {
|
|
}
|