From 086ba07a00978bbfd6438bf1f46c81f2533c6e1e Mon Sep 17 00:00:00 2001 From: AN Long Date: Sat, 5 Oct 2024 17:25:04 +0800 Subject: [PATCH] :sparkles: add Client::with_pools Co-authored-by: Anshul Goyal --- src/client.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/client.rs b/src/client.rs index 38274d0..efea0d5 100644 --- a/src/client.rs +++ b/src/client.rs @@ -127,6 +127,13 @@ impl Client { }) } + pub fn with_pools(pools: Vec>) -> Result { + Ok(Client { + connections: pools, + hash_function: default_hash_function, + }) + } + pub fn connect(target: C) -> Result { Self::builder().add_server(target)?.build() }