pub struct ReverseProxy {Show 18 fields
failed_backends: Arc<RwLock<TtlCache<UpstreamInner, u64>>>,
load_balancer_algorithm: Arc<LoadBalancerAlgorithmInner>,
proxy_to: Arc<Vec<(Upstream, Option<usize>, Option<Duration>)>>,
health_check_max_fails: u64,
enable_health_check: bool,
disable_certificate_verification: bool,
proxy_intercept_errors: bool,
retry_connection: bool,
proxy_http2_only: bool,
proxy_http2: bool,
proxy_keepalive: bool,
proxy_header: Option<ProxyHeader>,
headers_to_add: Arc<Vec<(HeaderName, String)>>,
headers_to_replace: Arc<Vec<(HeaderName, String)>>,
headers_to_remove: Arc<Vec<HeaderName>>,
rewrite_host: bool,
connections: Arc<Pool<(UpstreamInner, Option<IpAddr>), SendRequestWrapper>>,
unix_connections: Arc<Pool<(UpstreamInner, Option<IpAddr>), SendRequestWrapper>>,
}Expand description
A reverse proxy
Fields§
§failed_backends: Arc<RwLock<TtlCache<UpstreamInner, u64>>>§load_balancer_algorithm: Arc<LoadBalancerAlgorithmInner>§proxy_to: Arc<Vec<(Upstream, Option<usize>, Option<Duration>)>>§health_check_max_fails: u64§enable_health_check: bool§disable_certificate_verification: bool§proxy_intercept_errors: bool§retry_connection: bool§proxy_http2_only: bool§proxy_http2: bool§proxy_keepalive: bool§proxy_header: Option<ProxyHeader>§headers_to_add: Arc<Vec<(HeaderName, String)>>§headers_to_replace: Arc<Vec<(HeaderName, String)>>§headers_to_remove: Arc<Vec<HeaderName>>§rewrite_host: bool§connections: Arc<Pool<(UpstreamInner, Option<IpAddr>), SendRequestWrapper>>§unix_connections: Arc<Pool<(UpstreamInner, Option<IpAddr>), SendRequestWrapper>>Implementations§
Source§impl ReverseProxy
impl ReverseProxy
Sourcepub fn get_handler(&self) -> ReverseProxyHandler
pub fn get_handler(&self) -> ReverseProxyHandler
Creates a request handler instance with shared proxy state.
Auto Trait Implementations§
impl Freeze for ReverseProxy
impl !RefUnwindSafe for ReverseProxy
impl Send for ReverseProxy
impl Sync for ReverseProxy
impl Unpin for ReverseProxy
impl UnsafeUnpin for ReverseProxy
impl !UnwindSafe for ReverseProxy
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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