pub enum HttpRouteFilter {
    RequestHeaderModifier {
        request_header_modifier: HttpRequestHeaderFilter,
    },
    ResponseHeaderModifier {
        response_header_modifier: HttpRequestHeaderFilter,
    },
    RequestMirror {
        request_mirror: HttpRequestMirrorFilter,
    },
    RequestRedirect {
        request_redirect: HttpRequestRedirectFilter,
    },
    URLRewrite {
        url_rewrite: HttpUrlRewriteFilter,
    },
    ExtensionRef {
        extension_ref: LocalObjectReference,
    },
}
Expand description

HTTPRouteFilter defines processing steps that must be completed during the request or response lifecycle. HTTPRouteFilters are meant as an extension point to express processing that may be done in Gateway implementations. Some examples include request or response modification, implementing authentication strategies, rate-limiting, and traffic shaping. API guarantee/conformance is defined based on the type of the filter.

Type identifies the type of filter to apply. As with other API fields, types are classified into three conformance levels:

  • Core: Filter types and their corresponding configuration defined by “Support: Core” in this package, e.g. “RequestHeaderModifier”. All implementations must support core filters.

  • Extended: Filter types and their corresponding configuration defined by “Support: Extended” in this package, e.g. “RequestMirror”. Implementers are encouraged to support extended filters.

  • Custom: Filters that are defined and supported by specific vendors. In the future, filters showing convergence in behavior across multiple implementations will be considered for inclusion in extended or core conformance levels. Filter-specific configuration for such filters is specified using the ExtensionRef field. Type should be set to “ExtensionRef” for custom filters.

Implementers are encouraged to define custom implementation types to extend the core API with implementation-specific behavior.

If a reference to a custom filter type cannot be resolved, the filter MUST NOT be skipped. Instead, requests that would have been processed by that filter MUST receive a HTTP error response.

Variants§

§

RequestHeaderModifier

Fields

§request_header_modifier: HttpRequestHeaderFilter

RequestHeaderModifier defines a schema for a filter that modifies request headers.

Support: Core

§

ResponseHeaderModifier

Fields

§response_header_modifier: HttpRequestHeaderFilter

ResponseHeaderModifier defines a schema for a filter that modifies response headers.

Support: Extended

§

RequestMirror

Fields

RequestMirror defines a schema for a filter that mirrors requests. Requests are sent to the specified destination, but responses from that destination are ignored.

Support: Extended

§

RequestRedirect

Fields

§request_redirect: HttpRequestRedirectFilter

RequestRedirect defines a schema for a filter that responds to the request with an HTTP redirection.

Support: Core

§

URLRewrite

Fields

URLRewrite defines a schema for a filter that modifies a request during forwarding.

Support: Extended

§

ExtensionRef

Fields

§extension_ref: LocalObjectReference

ExtensionRef is an optional, implementation-specific extension to the “filter” behavior. For example, resource “myroutefilter” in group “networking.example.net”). ExtensionRef MUST NOT be used for core and extended filters.

Support: Implementation-specific

Trait Implementations§

source§

impl Clone for HttpRouteFilter

source§

fn clone(&self) -> HttpRouteFilter

Returns a copy 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 HttpRouteFilter

source§

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

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

impl<'de> Deserialize<'de> for HttpRouteFilter

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 JsonSchema for HttpRouteFilter

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl PartialEq<HttpRouteFilter> for HttpRouteFilter

source§

fn eq(&self, other: &HttpRouteFilter) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for HttpRouteFilter

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 Eq for HttpRouteFilter

source§

impl StructuralEq for HttpRouteFilter

source§

impl StructuralPartialEq for HttpRouteFilter

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,