pub struct GrpcDetectionFilter;Expand description
Detects gRPC requests from the content-type header and promotes the
variant to filter metadata and results for downstream routing.
Detection values: grpc (bare application/grpc), grpc+proto,
grpc+json, grpc+other (unrecognized sub-protocol), none
(non-gRPC request).
Writes grpc_detection.kind to both filter metadata and filter
results for branch chain conditions.
§YAML
filter: grpc_detectionImplementations§
Source§impl GrpcDetectionFilter
impl GrpcDetectionFilter
Sourcepub fn from_config(_config: &Value) -> Result<Box<dyn HttpFilter>, FilterError>
pub fn from_config(_config: &Value) -> Result<Box<dyn HttpFilter>, FilterError>
Trait Implementations§
Source§impl HttpFilter for GrpcDetectionFilter
impl HttpFilter for GrpcDetectionFilter
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Unique name identifying this filter type (e.g.
"router", "rate_limit").Source§fn on_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut HttpFilterContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<FilterAction, FilterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut HttpFilterContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<FilterAction, FilterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called for each incoming request, in pipeline order.
Source§fn on_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut HttpFilterContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<FilterAction, FilterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut HttpFilterContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<FilterAction, FilterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called for each response, in reverse pipeline order. Read more
Source§fn request_body_access(&self) -> BodyAccess
fn request_body_access(&self) -> BodyAccess
Declares what access this filter needs to request bodies. Read more
Source§fn response_body_access(&self) -> BodyAccess
fn response_body_access(&self) -> BodyAccess
Declares what access this filter needs to response bodies. Read more
Source§fn request_body_mode(&self) -> BodyMode
fn request_body_mode(&self) -> BodyMode
Declares the delivery mode for request body chunks. Read more
Source§fn response_body_mode(&self) -> BodyMode
fn response_body_mode(&self) -> BodyMode
Declares the delivery mode for response body chunks. Read more
Source§fn needs_request_context(&self) -> bool
fn needs_request_context(&self) -> bool
Whether this filter needs the original request context
during body phases. Read more
Source§fn apply_insecure_options(&self, _options: &InsecureOptions)
fn apply_insecure_options(&self, _options: &InsecureOptions)
Apply global
InsecureOptions to this filter. Read moreSource§fn compression_config(&self) -> Option<&CompressionConfig>
fn compression_config(&self) -> Option<&CompressionConfig>
Returns the compression configuration if this filter enables
response compression. Read more
Source§fn on_request_body<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 mut HttpFilterContext<'life2>,
body: &'life3 mut Option<Bytes>,
end_of_stream: bool,
) -> Pin<Box<dyn Future<Output = Result<FilterAction, FilterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn on_request_body<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 mut HttpFilterContext<'life2>,
body: &'life3 mut Option<Bytes>,
end_of_stream: bool,
) -> Pin<Box<dyn Future<Output = Result<FilterAction, FilterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Called for each chunk of request body data, in pipeline order. Read more
Source§fn on_response_body(
&self,
ctx: &mut HttpFilterContext<'_>,
body: &mut Option<Bytes>,
end_of_stream: bool,
) -> Result<FilterAction, FilterError>
fn on_response_body( &self, ctx: &mut HttpFilterContext<'_>, body: &mut Option<Bytes>, end_of_stream: bool, ) -> Result<FilterAction, FilterError>
Called for each chunk of response body data, in reverse
pipeline order. Read more
Auto Trait Implementations§
impl Freeze for GrpcDetectionFilter
impl RefUnwindSafe for GrpcDetectionFilter
impl Send for GrpcDetectionFilter
impl Sync for GrpcDetectionFilter
impl Unpin for GrpcDetectionFilter
impl UnsafeUnpin for GrpcDetectionFilter
impl UnwindSafe for GrpcDetectionFilter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more