Skip to main content

Module router

Module router 

Source
Available on crate feature gateway-api only.
Expand description

Routing one request on a Gateway listener port: pick the listener by hostname, the rule by the Gateway API’s precedence, a backend by weight, an endpoint, and forward — keeping the client’s Host.

Precedence (HTTPRoute spec), highest first: the longest non-wildcard matching hostname, the longest matching hostname, an Exact path over a PathPrefix, the longest path, a method match, the most header matches, the most query-parameter matches; ties go to the oldest route, then the route’s namespace/name, then rule and match order.

Structs§

PortRouter

Type Aliases§

PortListeners
The listeners served on one container port (one Gateway’s, one port; several when they differ by hostname).