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.
Trait Implementations§
Source§impl Clone for RouteEntry
impl Clone for RouteEntry
Source§fn clone(&self) -> RouteEntry
fn clone(&self) -> RouteEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RouteEntry
impl RefUnwindSafe for RouteEntry
impl Send for RouteEntry
impl Sync for RouteEntry
impl Unpin for RouteEntry
impl UnsafeUnpin for RouteEntry
impl UnwindSafe for RouteEntry
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more