pub struct RouteTarget {
pub address: String,
pub service_name: String,
pub path_pattern: Option<String>,
pub weight: u32,
pub strip_prefix: Option<String>,
}Expand description
A backend target for container routing.
Fields§
§address: StringAddress in the form ip:port.
service_name: StringOwning service name.
path_pattern: Option<String>Optional path pattern (e.g., "/api/*"). When None, this target is a
catch-all for the domain. When Some, only requests whose path matches
the pattern are routed here. Longest-prefix match wins.
weight: u32Traffic weight (1-100, default 100). Used for weighted routing during canary deployments. Higher weight = more traffic.
strip_prefix: Option<String>Prefix to strip from the request path before forwarding upstream,
e.g. "/admin". With path_pattern = "/admin/*" and
strip_prefix = Some("/admin"), a request for /admin/users is
forwarded as /users — same semantics as Caddy’s handle_path.
Trait Implementations§
Source§impl Clone for RouteTarget
impl Clone for RouteTarget
Source§fn clone(&self) -> RouteTarget
fn clone(&self) -> RouteTarget
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 RouteTarget
impl RefUnwindSafe for RouteTarget
impl Send for RouteTarget
impl Sync for RouteTarget
impl Unpin for RouteTarget
impl UnsafeUnpin for RouteTarget
impl UnwindSafe for RouteTarget
Blanket Implementations§
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