{"repo":"importcjj/mobc","free":true,"listed":false,"github":"https://github.com/importcjj/mobc","clone":"git clone https://github.com/importcjj/mobc.git","description":"A generic connection pool for Rust with async/await support","language":"Rust","stars":297,"topics":["rust-lang","async","await","database","connection-pool","pool","redis","postgres","rust"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Mobc A generic connection pool with async/await support. Inspired by Deadpool, Sqlx, r2d2 and Golang SQL package. Changelog Note: mobc requires at least Rust 1.60. Usage Features - Support async/.await syntax - Support both tokio and async-std - Tokio metric support - Production battle tested - High performance - Easy to customize - Dynamic configuration Adaptors Backend Adaptor Crate ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------- bolt-client mobc-bolt tokio-postgres mobc-postgres redis mobc-redis arangodb mobc-arangors lapin mobc-lapin reql mobc-reql redis-cluster mobc-redis-cluster More DB adaptors are welcome. Examples More examples Using an imaginary \"foodb\" database. Configures max open Sets the maximum number of connections managed by the pool. 0 means unlimited, defaults to 10. max idle Sets the maximum idle connection count maintained by the pool. The pool will maintain at most this many idle connections at all times, while respecting the value of max open. max lifetime Sets the maximum lifetime of connections in the pool. Expired connections may be closed lazily before reuse. None meas reuse forever, defaults to None. get timeout Sets the get timeout used by the pool. Calls to Pool::get will wait this long for a connection to become available before returning an error. None meas never timeout, defaults to 30 seconds. Variable Some of the connection pool ","default_branch":null,"files":null,"tree":[],"storefront":"/r/importcjj","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/importcjj/mobc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}