Struct junction_api::http::RouteRule
source · pub struct RouteRule {
pub matches: Vec<RouteMatch>,
pub timeouts: Option<RouteTimeouts>,
pub retry: Option<RouteRetry>,
pub backends: Vec<WeightedBackend>,
/* private fields */
}
Expand description
A RouteRule contains a set of matches that define which requests it applies to, processing rules, and the final destination(s) for matching traffic.
See the Junction docs for a high level description of how Routes and RouteRules behave.
Fields§
§matches: Vec<RouteMatch>
A list of match rules applied to an outgoing request. Each match is independent; this rule will be matched if any of the listed matches is satsified.
If no matches are specified, this Rule matches any outgoing request.
timeouts: Option<RouteTimeouts>
§retry: Option<RouteRetry>
How to retry requests. If not specified, requests are not retried.
backends: Vec<WeightedBackend>
Where the traffic should route if this rule matches.
If no backends are specified, traffic is sent to the VirtualHost this route was defined with, using the request’s port to fill in any defaults.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for RouteRule
impl<'de> Deserialize<'de> for RouteRule
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
impl StructuralPartialEq for RouteRule
Auto Trait Implementations§
impl Freeze for RouteRule
impl RefUnwindSafe for RouteRule
impl Send for RouteRule
impl Sync for RouteRule
impl Unpin for RouteRule
impl UnwindSafe for RouteRule
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request