pub struct RouteRule {
pub name: Option<Name>,
pub matches: Vec<RouteMatch>,
pub timeouts: Option<RouteTimeouts>,
pub retry: Option<RouteRetry>,
pub backends: Vec<BackendRef>,
/* 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§
§name: Option<Name>
A human-readable name for this rule.
This name is compeltely optional, and will only be used in diagnostics to make it easier to debug. Diagnostics that don’t have a name will be referred to by their index in a Route’s list of rules.
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<BackendRef>
Where the traffic should route if this rule matches.
If no backends are specified, this route becomes a black hole for traffic and all matching requests return an error.