pub struct UpstreamRoute {
pub path: String,
pub target: String,
}Expand description
A per-path-prefix upstream override (a [[upstreams]] entry). Requests whose path starts with
path are forwarded to target instead of the default server.upstream; the longest matching
prefix wins. This is deliberately a static prefix map for the common “static frontend + /api
backend” shape — not a gateway: no service discovery, load balancing, health-based routing, or
request rewriting (the path is forwarded unchanged). For those, put EdgeGuard behind a real
gateway/mesh.
Fields§
§path: StringPath prefix this upstream applies to, e.g. /api/.
target: StringUpstream base URL for this prefix, e.g. http://api.internal:4000.
Trait Implementations§
Source§impl Clone for UpstreamRoute
impl Clone for UpstreamRoute
Source§fn clone(&self) -> UpstreamRoute
fn clone(&self) -> UpstreamRoute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpstreamRoute
impl Debug for UpstreamRoute
Source§impl Default for UpstreamRoute
impl Default for UpstreamRoute
Source§fn default() -> UpstreamRoute
fn default() -> UpstreamRoute
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UpstreamRoutewhere
UpstreamRoute: Default,
impl<'de> Deserialize<'de> for UpstreamRoutewhere
UpstreamRoute: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UpstreamRoute
impl RefUnwindSafe for UpstreamRoute
impl Send for UpstreamRoute
impl Sync for UpstreamRoute
impl Unpin for UpstreamRoute
impl UnsafeUnpin for UpstreamRoute
impl UnwindSafe for UpstreamRoute
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