router.go 614 B

123456789101112131415161718
  1. package restful
  2. // Copyright 2013 Ernest Micklei. All rights reserved.
  3. // Use of this source code is governed by a license
  4. // that can be found in the LICENSE file.
  5. import "net/http"
  6. // A RouteSelector finds the best matching Route given the input HTTP Request
  7. type RouteSelector interface {
  8. // SelectRoute finds a Route given the input HTTP Request and a list of WebServices.
  9. // It returns a selected Route and its containing WebService or an error indicating
  10. // a problem.
  11. SelectRoute(
  12. webServices []*WebService,
  13. httpRequest *http.Request) (selectedService *WebService, selected *Route, err error)
  14. }