A backend implementation for the OTP library confirmator.
[
{mongopool, [
{pools, [
{mypool, [
{size, 10},
{max_overflow, 30}
], [
{database, <<"mydb">>},
{hostname, dbserver},
{login, "myuser"},
{password, "mypassword"},
{w_mode, safe}
]}
]}
]},
{confirmator, [
{backend, confirmator_mongopool}
]},
{confirmator_mongopool, [
{pool, mypool},
{table, mytable}
]}
]
Configure confirmator
to use this backend
.
Start the plugin:
application:ensure_all_started(confirmator_mongopool).
{ok, AppCtx} = confirmator:init().
Or, if want initialize manually the plugin:
application:ensure_all_started(confirmator_mongopool).
{ok, AppCtx} = confirmator_mongopool:init(mypool, mytable).
To know how to use it, see directly the confirmator documentation.
$ rebar3 compile
$ ./utils/rebar3 eunit