Route matches a request in the current routing tree. If the request matches a route, returns the route and a map of parameters constructed from the wildcard parameters in the path condition if any. If there is no match, it returns nil.
(req *http.Request)
| 448 | // parameters constructed from the wildcard parameters in the path |
| 449 | // condition if any. If there is no match, it returns nil. |
| 450 | func (r *Routing) Route(req *http.Request) (*Route, map[string]string) { |
| 451 | rt := r.routeTable.Load().(*routeTable) |
| 452 | return rt.m.match(req) |
| 453 | } |
| 454 | |
| 455 | // FirstLoad, when enabled, blocks until the first routing configuration was received |
| 456 | // by the routing during the startup. When disabled, it doesn't block. |