Skip to content

hachreak/confirmator_mongopool

Repository files navigation

confirmator mongopool

Build Status

A backend implementation for the OTP library confirmator.

Configuration

[
  {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}
  ]}
]

Usage

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.

Build

$ rebar3 compile

Tests

$ ./utils/rebar3 eunit

About

A backend implementation for the OTP library confirmator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published