Skip to main content

Module routes

Module routes 

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

HTTPRoutes compiled for the data plane: matches, filters, and backends resolved to the ready endpoints of their Services (through the Service’s port → EndpointSlice port), so the router does no lookups per request.

Structs§

Backend
CompiledHttpRoute
CompiledRule
Mirror
Where a RequestMirror filter sends copies, and how many.
Resolved
What a backendRef resolves to.

Constants§

GRPC_METHOD_MATCH
The matches.path type a gRPC method match with only a method compiles to: the value is the method, matched as the path’s second segment of /<service>/<method> (not an API type; internal).

Functions§

compile
compile_grpc
A GRPCRoute compiled to the same form as an HTTPRoute: a method match becomes a path match on /<service>/<method> (Exact for both, PathPrefix /<service> for a service alone, GRPC_METHOD_MATCH for a method alone); RegularExpression matches nothing (implementation specific, not supported). Backends are reached over h2c.
compile_l4
A TLSRoute, TCPRoute or UDPRoute: one rule per rule, no matches (the data plane picks the route by SNI or age, then a rule’s backend by weight).
resolve
A backendRef → its ready endpoints, appProtocol and BackendTLSPolicy.