db_connection v0.2.5 DBConnection.Sojourn

A DBConnection.Pool using sbroker.

Options

  • :pool_size - The number of connections (default: 10)
  • :broker - The sbroker callback module (see :sbroker, default: DBConnection.Sojourn.Timeout)
  • :broker_start_opts - Start options for the broker (see :sbroker, default: [])
  • :max_restarts - the maximum amount of connection restarts allowed in a time frame (default 3)
  • :max_seconds - the time frame in which :max_restarts applies (default 5)
  • :shutdown - the shutdown strategy for connections (default 5_000)

All options are passed as the argument to the sbroker callback module.

Summary

Functions

See DBConnection.Connection.checkin/3

See DBConnection.Connection.disconnect/4

See DBConnection.Connection.stop/4

Functions

checkin(ref, state, opts)

See DBConnection.Connection.checkin/3.

disconnect(ref, err, state, opts)

See DBConnection.Connection.disconnect/4.

stop(ref, reason, state, opts)

See DBConnection.Connection.stop/4.