package redis-lwt

  1. Overview
  2. Docs

Module Redis_lwt.PoolSource

Sourcemodule IO = IO
Sourcemodule Client = Client
Sourcetype t
Sourceval size : t -> int
Sourceval create : size:int -> Client.connection_spec -> t IO.t

Create a pool of size connections, using the given spec.

Sourceval close : t -> unit IO.t

Close all connections

Sourceval with_pool : size:int -> Client.connection_spec -> (t -> 'a IO.t) -> 'a IO.t

Create a pool of size connections, using the given spec, pass it to the callback, and then destroy it.

Sourceval with_connection : t -> (Client.connection -> 'a IO.t) -> 'a IO.t

Temporarily require a connection to perform some operation. The connection must not escape the scope of the callback

OCaml

Innovation. Community. Security.