github.com/vieux/docker@v0.6.3-0.20161004191708-e097c2a938c7/api/server/router/plugin/plugin.go (about) 1 package plugin 2 3 import "github.com/docker/docker/api/server/router" 4 5 // pluginRouter is a router to talk with the plugin controller 6 type pluginRouter struct { 7 backend Backend 8 routes []router.Route 9 } 10 11 // NewRouter initializes a new plugin router 12 func NewRouter(b Backend) router.Router { 13 r := &pluginRouter{ 14 backend: b, 15 } 16 r.initRoutes() 17 return r 18 } 19 20 // Routes returns the available routers to the plugin controller 21 func (r *pluginRouter) Routes() []router.Route { 22 return r.routes 23 }