add plugins
This commit is contained in:
parent
92d91bd3f2
commit
87eaba55c7
|
@ -12,3 +12,4 @@ rel/emqttd*
|
||||||
.rebar
|
.rebar
|
||||||
test/ebin/*.beam
|
test/ebin/*.beam
|
||||||
.exrc
|
.exrc
|
||||||
|
plugins/*/ebin
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
LDAP Auth
|
LDAP Auth
|
||||||
MySQL Auth
|
MySQL Auth
|
||||||
|
Admin Console
|
||||||
|
AMQP
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{application, emqtt_plugin_admin,
|
{application, emqttd_admin,
|
||||||
[
|
[
|
||||||
{description, ""},
|
{description, ""},
|
||||||
{vsn, "1"},
|
{vsn, "1"},
|
||||||
|
@ -7,6 +7,6 @@
|
||||||
kernel,
|
kernel,
|
||||||
stdlib
|
stdlib
|
||||||
]},
|
]},
|
||||||
{mod, { emqtt_plugin_admin_app, []}},
|
{mod, { emqttd_admin_app, []}},
|
||||||
{env, []}
|
{env, []}
|
||||||
]}.
|
]}.
|
|
@ -1,4 +1,4 @@
|
||||||
-module(emqtt_plugin_admin_app).
|
-module(emqttd_admin_app).
|
||||||
|
|
||||||
-behaviour(application).
|
-behaviour(application).
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
%% ===================================================================
|
%% ===================================================================
|
||||||
|
|
||||||
start(_StartType, _StartArgs) ->
|
start(_StartType, _StartArgs) ->
|
||||||
emqtt_plugin_admin_sup:start_link().
|
emqttd_admin_sup:start_link().
|
||||||
|
|
||||||
stop(_State) ->
|
stop(_State) ->
|
||||||
ok.
|
ok.
|
|
@ -1,5 +1,4 @@
|
||||||
|
-module(emqttd_admin_sup).
|
||||||
-module(emqtt_plugin_admin_sup).
|
|
||||||
|
|
||||||
-behaviour(supervisor).
|
-behaviour(supervisor).
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
{application, emqttd_amqp,
|
||||||
|
[
|
||||||
|
{description, ""},
|
||||||
|
{vsn, "1"},
|
||||||
|
{registered, []},
|
||||||
|
{applications, [
|
||||||
|
kernel,
|
||||||
|
stdlib
|
||||||
|
]},
|
||||||
|
{mod, { emqttd_amqp_app, []}},
|
||||||
|
{env, []}
|
||||||
|
]}.
|
|
@ -0,0 +1,16 @@
|
||||||
|
-module(emqttd_amqp_app).
|
||||||
|
|
||||||
|
-behaviour(application).
|
||||||
|
|
||||||
|
%% Application callbacks
|
||||||
|
-export([start/2, stop/1]).
|
||||||
|
|
||||||
|
%% ===================================================================
|
||||||
|
%% Application callbacks
|
||||||
|
%% ===================================================================
|
||||||
|
|
||||||
|
start(_StartType, _StartArgs) ->
|
||||||
|
emqttd_amqp_sup:start_link().
|
||||||
|
|
||||||
|
stop(_State) ->
|
||||||
|
ok.
|
|
@ -0,0 +1,27 @@
|
||||||
|
-module(emqttd_amqp_sup).
|
||||||
|
|
||||||
|
-behaviour(supervisor).
|
||||||
|
|
||||||
|
%% API
|
||||||
|
-export([start_link/0]).
|
||||||
|
|
||||||
|
%% Supervisor callbacks
|
||||||
|
-export([init/1]).
|
||||||
|
|
||||||
|
%% Helper macro for declaring children of supervisor
|
||||||
|
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
|
||||||
|
|
||||||
|
%% ===================================================================
|
||||||
|
%% API functions
|
||||||
|
%% ===================================================================
|
||||||
|
|
||||||
|
start_link() ->
|
||||||
|
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
|
||||||
|
|
||||||
|
%% ===================================================================
|
||||||
|
%% Supervisor callbacks
|
||||||
|
%% ===================================================================
|
||||||
|
|
||||||
|
init([]) ->
|
||||||
|
{ok, { {one_for_one, 5, 10}, []} }.
|
||||||
|
|
Loading…
Reference in New Issue