router.go 542 B

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