Skip to content

Commit

Permalink
✨ add Client::with_pools
Browse files Browse the repository at this point in the history
Co-authored-by:  Anshul Goyal <goyal-anshul@users.noreply.github.com>
  • Loading branch information
aisk and goyal-anshul committed Oct 5, 2024
1 parent 2e95285 commit 086ba07
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ impl Client {
})
}

pub fn with_pools(pools: Vec<Pool<ConnectionManager>>) -> Result<Self, MemcacheError> {
Ok(Client {
connections: pools,
hash_function: default_hash_function,
})
}

pub fn connect<C: Connectable>(target: C) -> Result<Self, MemcacheError> {
Self::builder().add_server(target)?.build()
}
Expand Down

0 comments on commit 086ba07

Please sign in to comment.