Skip to main content

Module pool

Module pool 

Source
Expand description

Connection pool for ringline-memcache.

Pool manages a fixed set of backend connections with round-robin dispatch and lazy reconnection. It is single-threaded (no Arc, no Mutex) — designed for use within a single ringline async worker.

§Usage

let config = PoolConfig {
    addr: "127.0.0.1:11211".parse().unwrap(),
    pool_size: 4,
    connect_timeout_ms: 0,
    tls_server_name: None,
};
let mut pool = Pool::new(config);
pool.connect_all().await?;
pool.client().await?.set("k", "v").await?;

Structs§

Pool
A fixed-size connection pool with round-robin dispatch.
PoolConfig
Configuration for a connection pool.