Struct google_api_proto::google::cloud::networkservices::v1::http_route::RouteAction
source · pub struct RouteAction {
pub destinations: Vec<Destination>,
pub redirect: Option<Redirect>,
pub fault_injection_policy: Option<FaultInjectionPolicy>,
pub request_header_modifier: Option<HeaderModifier>,
pub response_header_modifier: Option<HeaderModifier>,
pub url_rewrite: Option<UrlRewrite>,
pub timeout: Option<Duration>,
pub retry_policy: Option<RetryPolicy>,
pub request_mirror_policy: Option<RequestMirrorPolicy>,
pub cors_policy: Option<CorsPolicy>,
}
Expand description
The specifications for routing traffic and applying associated policies.
Fields§
§destinations: Vec<Destination>
The destination to which traffic should be forwarded.
redirect: Option<Redirect>
If set, the request is directed as configured by this field.
fault_injection_policy: Option<FaultInjectionPolicy>
The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted for a percentage of requests.
timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy
request_header_modifier: Option<HeaderModifier>
The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
response_header_modifier: Option<HeaderModifier>
The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
url_rewrite: Option<UrlRewrite>
The specification for rewrite URL before forwarding requests to the destination.
timeout: Option<Duration>
Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.
retry_policy: Option<RetryPolicy>
Specifies the retry policy associated with this route.
request_mirror_policy: Option<RequestMirrorPolicy>
Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Proxy will not wait for the shadow destination to respond before returning the response. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow.
cors_policy: Option<CorsPolicy>
The specification for allowing client side cross-origin requests.
Trait Implementations§
source§impl Clone for RouteAction
impl Clone for RouteAction
source§fn clone(&self) -> RouteAction
fn clone(&self) -> RouteAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RouteAction
impl Debug for RouteAction
source§impl Default for RouteAction
impl Default for RouteAction
source§impl Message for RouteAction
impl Message for RouteAction
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for RouteAction
impl PartialEq for RouteAction
source§fn eq(&self, other: &RouteAction) -> bool
fn eq(&self, other: &RouteAction) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RouteAction
Auto Trait Implementations§
impl Freeze for RouteAction
impl RefUnwindSafe for RouteAction
impl Send for RouteAction
impl Sync for RouteAction
impl Unpin for RouteAction
impl UnwindSafe for RouteAction
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
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request