pub struct Connections {
load_balancer_cache: HashMap<(LoadBalancerAlgorithm, Arc<Vec<(Upstream, Option<usize>, Option<Duration>)>>), Arc<LoadBalancerAlgorithmInner>>,
failed_backend_cache: HashMap<(Duration, u64, Arc<Vec<(Upstream, Option<usize>, Option<Duration>)>>), Arc<RwLock<TtlCache<UpstreamInner, u64>>>>,
connections: Arc<Pool<(UpstreamInner, Option<IpAddr>), SendRequestWrapper>>,
unix_connections: Arc<Pool<(UpstreamInner, Option<IpAddr>), SendRequestWrapper>>,
}Expand description
Connection pool for reverse proxy
Fields§
§load_balancer_cache: HashMap<(LoadBalancerAlgorithm, Arc<Vec<(Upstream, Option<usize>, Option<Duration>)>>), Arc<LoadBalancerAlgorithmInner>>§failed_backend_cache: HashMap<(Duration, u64, Arc<Vec<(Upstream, Option<usize>, Option<Duration>)>>), Arc<RwLock<TtlCache<UpstreamInner, u64>>>>§connections: Arc<Pool<(UpstreamInner, Option<IpAddr>), SendRequestWrapper>>§unix_connections: Arc<Pool<(UpstreamInner, Option<IpAddr>), SendRequestWrapper>>Implementations§
Source§impl Connections
impl Connections
Sourcepub fn with_global_limit(global_limit: usize) -> Self
pub fn with_global_limit(global_limit: usize) -> Self
Creates a connection pool with a global TCP connection limit.
Unix socket connections remain unbounded.
Sourcepub fn get_builder<'a>(&'a mut self) -> ReverseProxyBuilder<'a>
pub fn get_builder<'a>(&'a mut self) -> ReverseProxyBuilder<'a>
Starts a reverse proxy builder using this connection pool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Connections
impl !RefUnwindSafe for Connections
impl Send for Connections
impl Sync for Connections
impl Unpin for Connections
impl !UnwindSafe for Connections
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