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(
deployment: Option<&str>,
service_name: &str,
endpoint: &EndpointSpec,
) -> Self
pub fn from_endpoint( deployment: Option<&str>, 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(deployment, service_name, endpoint.name) so that
the load balancer can maintain a distinct backend group per
(deployment, service, endpoint), which is required both for
target_role filtering (different endpoints on the same service may
target different replica groups) AND for deployment isolation (two
deployments sharing a service+endpoint name must NOT share a backend
pool — otherwise a request to one deployment’s service is answered by
the other’s backends).
deployment is the owning deployment name when known (Some), or
None for standalone / single-deployment callers (docker run).
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