Skip to main content

Module routes

Module routes 

Source
Expand description

Service registry for route resolution

This module provides a production-ready ServiceRegistry for mapping incoming requests to backend services based on host patterns (including wildcards) and path prefixes. Routes are stored in longest-prefix-first order so that resolve() returns the most specific match in O(n).

Structs§

ResolvedService
Fully-resolved service information returned by the registry.
RouteEntry
A single route entry in the registry.
ServiceRegistry
Production-ready service registry for the ZLayer reverse proxy.

Functions§

transform_path
Transform path by optionally stripping prefix.