HttpRouteRouteAction

Struct HttpRouteRouteAction 

Source
pub struct HttpRouteRouteAction {
Show 13 fields pub cors_policy: Option<HttpRouteCorsPolicy>, pub destinations: Option<Vec<HttpRouteDestination>>, pub direct_response: Option<HttpRouteHttpDirectResponse>, pub fault_injection_policy: Option<HttpRouteFaultInjectionPolicy>, pub idle_timeout: Option<Duration>, pub redirect: Option<HttpRouteRedirect>, pub request_header_modifier: Option<HttpRouteHeaderModifier>, pub request_mirror_policy: Option<HttpRouteRequestMirrorPolicy>, pub response_header_modifier: Option<HttpRouteHeaderModifier>, pub retry_policy: Option<HttpRouteRetryPolicy>, pub stateful_session_affinity: Option<HttpRouteStatefulSessionAffinityPolicy>, pub timeout: Option<Duration>, pub url_rewrite: Option<HttpRouteURLRewrite>,
}
Expand description

The specifications for routing traffic and applying associated policies.

This type is not used in any activity, and only used as part of another schema.

Fields§

§cors_policy: Option<HttpRouteCorsPolicy>

The specification for allowing client side cross-origin requests.

§destinations: Option<Vec<HttpRouteDestination>>

The destination to which traffic should be forwarded.

§direct_response: Option<HttpRouteHttpDirectResponse>

Optional. Static HTTP Response object to be returned regardless of the request.

§fault_injection_policy: Option<HttpRouteFaultInjectionPolicy>

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

§idle_timeout: Option<Duration>

Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.

§redirect: Option<HttpRouteRedirect>

If set, the request is directed as configured by this field.

§request_header_modifier: Option<HttpRouteHeaderModifier>

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.

§request_mirror_policy: Option<HttpRouteRequestMirrorPolicy>

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.

§response_header_modifier: Option<HttpRouteHeaderModifier>

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.

§retry_policy: Option<HttpRouteRetryPolicy>

Specifies the retry policy associated with this route.

§stateful_session_affinity: Option<HttpRouteStatefulSessionAffinityPolicy>

Optional. Specifies cookie-based stateful session affinity.

§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.

§url_rewrite: Option<HttpRouteURLRewrite>

The specification for rewrite URL before forwarding requests to the destination.

Trait Implementations§

Source§

impl Clone for HttpRouteRouteAction

Source§

fn clone(&self) -> HttpRouteRouteAction

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HttpRouteRouteAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HttpRouteRouteAction

Source§

fn default() -> HttpRouteRouteAction

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for HttpRouteRouteAction

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HttpRouteRouteAction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Part for HttpRouteRouteAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,