pub struct RouteEntry {
pub service_name: String,
pub endpoint_name: String,
pub host: Option<String>,
pub path_prefix: String,
pub resolved: ResolvedService,
}Expand description
A single route entry in the registry.
Fields§
§service_name: StringOwning service name (e.g. “api”)
endpoint_name: StringEndpoint name within that service (e.g. “http”, “grpc”)
host: Option<String>Host pattern to match. None means match any host.
Supports wildcard patterns like *.example.com.
path_prefix: StringPath prefix to match. "/" matches all paths.
resolved: ResolvedServiceThe fully-resolved service returned on match.
Implementations§
Source§impl RouteEntry
impl RouteEntry
Sourcepub fn from_endpoint(service_name: &str, endpoint: &EndpointSpec) -> Self
pub fn from_endpoint(service_name: &str, endpoint: &EndpointSpec) -> Self
Create a RouteEntry from a zlayer_spec::EndpointSpec.
Fields that cannot be derived from the spec alone (backends, TLS, SNI) are given sensible defaults and can be overridden after construction.
resolved.name uses the composite key form
endpoint_lb_key(service_name, endpoint.name) so that the
load balancer can maintain a distinct backend group per endpoint,
which is required for target_role filtering (different endpoints
on the same service may target different replica groups).
Trait Implementations§
Source§impl Clone for RouteEntry
impl Clone for RouteEntry
Source§fn clone(&self) -> RouteEntry
fn clone(&self) -> RouteEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more