router.go 663 B

12345678910111213141516171819
  1. package router // import "github.com/docker/docker/api/server/router"
  2. import "github.com/docker/docker/api/server/httputils"
  3. // Router defines an interface to specify a group of routes to add to the docker server.
  4. type Router interface {
  5. // Routes returns the list of routes to add to the docker server.
  6. Routes() []Route
  7. }
  8. // Route defines an individual API route in the docker server.
  9. type Route interface {
  10. // Handler returns the raw function to create the http handler.
  11. Handler() httputils.APIFunc
  12. // Method returns the http method that the route responds to.
  13. Method() string
  14. // Path returns the subpath where the route responds to.
  15. Path() string
  16. }