This commit is contained in:
Mateusz Gruszczyński committed 2026-10-06 23:08:43 +02:00
1 parent 5d2aaeabe6
commit 9d6614c1b4
62 files changed
+558 -230

No files matched your search

+9 -1
View File
@@ -33,7 +33,7 @@ fn monotonic_millis() -> u64 {
.min(u64::MAX as u128) as u64
}
#[derive(Clone)]
#[derive(Clone, PartialEq, Eq)]
struct ClientFactory {
backend: Backend,
policy: AddressPolicy,
@@ -104,6 +104,14 @@ impl ProxyClient {
self.inner.stats()
}
/// Whether a newly compiled backend client has exactly the same connection
/// policy and lifecycle settings as this one. Compatible clients can be
/// retained across unrelated snapshot rebuilds so generation age and
/// rotation counters are not restarted from zero.
pub(crate) fn reusable_with(&self, other: &Self) -> bool {
self.inner.factory == other.inner.factory
}
/// Recycle an aged connection pool even when no user request arrives.
pub(crate) fn maintain_rotation(&self) {
self.inner.maintain_rotation();