Enum k8s_gateway_api::HttpRouteFilter
source · [−]pub enum HttpRouteFilter {
RequestHeaderModifier {
request_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.
Typeshould 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: HttpRequestHeaderFilterRequestHeaderModifier defines a schema for a filter that modifies request headers.
Support: Core
RequestMirror
Fields
request_mirror: HttpRequestMirrorFilterRequestMirror 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: HttpRequestRedirectFilterRequestRedirect defines a schema for a filter that responds to the request with an HTTP redirection.
Support: Core
URLRewrite
Fields
url_rewrite: HttpUrlRewriteFilterURLRewrite defines a schema for a filter that modifies a request during forwarding.
Support: Extended
ExtensionRef
Fields
extension_ref: LocalObjectReferenceExtensionRef 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
sourceimpl Clone for HttpRouteFilter
impl Clone for HttpRouteFilter
sourcefn clone(&self) -> HttpRouteFilter
fn clone(&self) -> HttpRouteFilter
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for HttpRouteFilter
impl Debug for HttpRouteFilter
sourceimpl<'de> Deserialize<'de> for HttpRouteFilter
impl<'de> Deserialize<'de> for HttpRouteFilter
sourcefn 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>,
sourceimpl JsonSchema for HttpRouteFilter
impl JsonSchema for HttpRouteFilter
sourcefn schema_name() -> String
fn schema_name() -> String
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more