add plugins

This commit is contained in:
Ery Lee 2015-03-12 12:50:18 +08:00
parent 92d91bd3f2
commit 87eaba55c7
10 changed files with 63 additions and 6 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ rel/emqttd*
.rebar
test/ebin/*.beam
.exrc
plugins/*/ebin

View File

@ -1,3 +1,5 @@
LDAP Auth
MySQL Auth
Admin Console
AMQP

View File

@ -1,4 +1,4 @@
{application, emqtt_plugin_admin,
{application, emqttd_admin,
[
{description, ""},
{vsn, "1"},
@ -7,6 +7,6 @@
kernel,
stdlib
]},
{mod, { emqtt_plugin_admin_app, []}},
{mod, { emqttd_admin_app, []}},
{env, []}
]}.

View File

@ -1,4 +1,4 @@
-module(emqtt_plugin_admin_app).
-module(emqttd_admin_app).
-behaviour(application).
@ -10,7 +10,7 @@
%% ===================================================================
start(_StartType, _StartArgs) ->
emqtt_plugin_admin_sup:start_link().
emqttd_admin_sup:start_link().
stop(_State) ->
ok.

View File

@ -1,5 +1,4 @@
-module(emqtt_plugin_admin_sup).
-module(emqttd_admin_sup).
-behaviour(supervisor).

View File

@ -0,0 +1,12 @@
{application, emqttd_amqp,
[
{description, ""},
{vsn, "1"},
{registered, []},
{applications, [
kernel,
stdlib
]},
{mod, { emqttd_amqp_app, []}},
{env, []}
]}.

View File

@ -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.

View File

@ -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}, []} }.

View File

View File