Mongodb v0.1.1 Mongo.Pool.Adapter behaviour
The driver supports multiple pooling strategies as long as they implement the following interface.
An adapter should supervise processes of Mongo.Connection
and
provide the run/2
function to execute an anonymous function with a
connection from the pool.
Summary
Callbacks
Runs the function with a checked out connection from the pool, after the function returns the pool should reclaim the connection
Starts any connection pooling and supervision
Types
name :: atom
Callbacks
Specs
run(name, (pid -> return)) :: {queue_time :: integer, return} when return: var
Runs the function with a checked out connection from the pool, after the function returns the pool should reclaim the connection.
Specs
start_link(name, Keyword.t) :: GenServer.on_start
Starts any connection pooling and supervision.