routingMiddleware is responsible for matching the incoming request to a registered endpoint. It runs early in the pipeline so that subsequent middleware can inspect the matched endpoint (e.g. for authorization or logging) before it is executed. If a match is found, the endpoint is stored in the con
| 30 | // ctx.SetEndpoint. If no match is found, the context will have |
| 31 | // a nil endpoint and downstream middleware can decide how to respond. |
| 32 | type routingMiddleware struct { |
| 33 | matcher EndpointMatcher |
| 34 | } |
| 35 | |
| 36 | // newRoutingMiddleware creates a new routingMiddleware with the given |
| 37 | // EndpointMatcher. This middleware should always be the first in the pipeline. |
nothing calls this directly
no outgoing calls
no test coverage detected