package resource-pooling

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

module Conf : CONF

Signature

val servers : unit -> Conf.serverid list
val server_exists : Conf.serverid -> bool

remove marks a given server as removed from the pool. HOWEVER, a number of attempts (corresponding to the number of connections to that server) to use that server might still occur. These are NOT connection attempts, so this does not come with substantial costs.

val remove : Conf.serverid -> unit

remove marks a given server as removed from the pool. HOWEVER, a number of attempts (corresponding to the number of connections to that server) to use that server might still occur. These are NOT connection attempts, so this does not come with substantial costs.

val add_one : ?connect_immediately:bool -> num_conn:int -> Conf.serverid -> Conf.server -> unit

Adds a server to the pool, permitting a maximum number num_conn of concurrent connections to that server. If connect_immediately is true (default: false then num_conn are immediately opened to the server. If the given server exists already no action is taken.

val add_many : ?connect_immediately:bool -> num_conn:int -> (Conf.serverid * Conf.server) list -> unit
val add_existing : num_conn:int -> Conf.serverid -> Conf.connection Resource_pool.t -> unit
val use : ?usage_attempts:int -> (Conf.connection -> 'a Lwt.t) -> 'a Lwt.t
OCaml

Innovation. Community. Security.