https://github.com/hachreak/confirmator_mongopool
A backend implementation for the OTP library confirmator.
https://github.com/hachreak/confirmator_mongopool
Last synced: 5 months ago
JSON representation
A backend implementation for the OTP library confirmator.
- Host: GitHub
- URL: https://github.com/hachreak/confirmator_mongopool
- Owner: hachreak
- License: other
- Created: 2015-11-29T23:11:53.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-26T18:27:39.000Z (over 8 years ago)
- Last Synced: 2025-02-16T22:27:55.986Z (8 months ago)
- Language: Erlang
- Size: 1.41 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
confirmator mongopool
=====================[](https://travis-ci.org/hachreak/confirmator_mongopool)
A backend implementation for the OTP library
[confirmator](https://github.com/hachreak/confirmator).Configuration
-------------```erlang
[
{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:
```erlang
application:ensure_all_started(confirmator_mongopool).
{ok, AppCtx} = confirmator:init().
```Or, if want initialize manually the plugin:
```erlang
application:ensure_all_started(confirmator_mongopool).
{ok, AppCtx} = confirmator_mongopool:init(mypool, mytable).
```To know how to use it, see directly the
[confirmator](https://github.com/hachreak/confirmator) documentation.Build
-----$ rebar3 compile
Tests
-----$ ./utils/rebar3 eunit