pub struct VirtualHostsHandler<H> { /* private fields */ }Expand description
Handler for Pingora’s request_filter phase
Trait Implementations§
Source§impl<H: Debug> Debug for VirtualHostsHandler<H>
impl<H: Debug> Debug for VirtualHostsHandler<H>
Source§impl<H> RequestFilter for VirtualHostsHandler<H>
impl<H> RequestFilter for VirtualHostsHandler<H>
Source§type Conf = VirtualHostsConf<<H as RequestFilter>::Conf>
type Conf = VirtualHostsConf<<H as RequestFilter>::Conf>
Configuration type of this handler.
Source§type CTX = <H as RequestFilter>::CTX
type CTX = <H as RequestFilter>::CTX
Per-request state of this handler, see
pingora_proxy::ProxyHttp::CTXSource§fn new_ctx() -> Self::CTX
fn new_ctx() -> Self::CTX
Creates a new sate object, see
pingora_proxy::ProxyHttp::new_ctxSource§fn request_filter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
ctx: &'life2 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = Result<RequestFilterResult, Box<Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn request_filter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
ctx: &'life2 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = Result<RequestFilterResult, Box<Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handler to run during Pingora’s
request_filter state, see
pingora_proxy::ProxyHttp::request_filter. This uses a different return type to account
for the existence of multiple request filters.Source§fn new(conf: Self::Conf) -> Result<Self, Box<Error>>
fn new(conf: Self::Conf) -> Result<Self, Box<Error>>
Creates a new instance of the handler from its configuration.
Source§impl<C, H> TryFrom<VirtualHostsConf<C>> for VirtualHostsHandler<H>
impl<C, H> TryFrom<VirtualHostsConf<C>> for VirtualHostsHandler<H>
Auto Trait Implementations§
impl<H> Freeze for VirtualHostsHandler<H>
impl<H> RefUnwindSafe for VirtualHostsHandler<H>where
H: RefUnwindSafe,
impl<H> Send for VirtualHostsHandler<H>where
H: Send,
impl<H> Sync for VirtualHostsHandler<H>where
H: Sync,
impl<H> Unpin for VirtualHostsHandler<H>where
H: Unpin,
impl<H> UnwindSafe for VirtualHostsHandler<H>where
H: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more