1 |
|
-module(mongoose_wpool_ldap). |
2 |
|
-behaviour(mongoose_wpool). |
3 |
|
|
4 |
|
-export([init/0]). |
5 |
|
-export([start/4, stop/2]). |
6 |
|
|
7 |
|
%% -------------------------------------------------------------- |
8 |
|
%% mongoose_wpool callbacks |
9 |
|
-spec init() -> ok. |
10 |
|
init() -> |
11 |
101 |
ok. |
12 |
|
|
13 |
|
-spec start(mongooseim:host_type_or_global(), mongoose_wpool:tag(), |
14 |
|
mongoose_wpool:pool_opts(), mongoose_wpool:conn_opts()) -> {ok, pid()} | {error, any()}. |
15 |
|
start(HostType, Tag, WpoolOpts, ConnOpts) -> |
16 |
202 |
WorkerSpec = {mongoose_ldap_worker, ConnOpts}, |
17 |
202 |
ProcName = mongoose_wpool:make_pool_name(ldap, HostType, Tag), |
18 |
202 |
mongoose_wpool:start_sup_pool(ldap, ProcName, [{worker, WorkerSpec} | WpoolOpts]). |
19 |
|
|
20 |
|
-spec stop(mongooseim:host_type_or_global(), mongoose_wpool:tag()) -> ok. |
21 |
|
stop(_HostType, _Tag) -> |
22 |
196 |
ok. |