refactor: delete plugin management APIs from emqx_mgmt
Will move the APIs to emqx_plugins_api.erl
This commit is contained in:
parent
3a7924d0fd
commit
48ad0adbaa
|
@ -79,14 +79,6 @@
|
||||||
, do_unsubscribe/2
|
, do_unsubscribe/2
|
||||||
]).
|
]).
|
||||||
|
|
||||||
%% Plugins
|
|
||||||
-export([ list_plugins/0
|
|
||||||
, list_plugins/1
|
|
||||||
, load_plugin/2
|
|
||||||
, unload_plugin/2
|
|
||||||
, reload_plugin/2
|
|
||||||
]).
|
|
||||||
|
|
||||||
%% Listeners
|
%% Listeners
|
||||||
-export([ list_listeners/0
|
-export([ list_listeners/0
|
||||||
, list_listeners/1
|
, list_listeners/1
|
||||||
|
@ -457,33 +449,6 @@ do_unsubscribe(ClientId, Topic) ->
|
||||||
Pid ! {unsubscribe, [emqx_topic:parse(Topic)]}
|
Pid ! {unsubscribe, [emqx_topic:parse(Topic)]}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
|
||||||
%% Plugins
|
|
||||||
%%--------------------------------------------------------------------
|
|
||||||
|
|
||||||
list_plugins() ->
|
|
||||||
[{Node, list_plugins(Node)} || Node <- mria_mnesia:running_nodes()].
|
|
||||||
|
|
||||||
list_plugins(Node) when Node =:= node() ->
|
|
||||||
emqx_plugins:list();
|
|
||||||
list_plugins(Node) ->
|
|
||||||
rpc_call(Node, list_plugins, [Node]).
|
|
||||||
|
|
||||||
load_plugin(Node, Plugin) when Node =:= node() ->
|
|
||||||
emqx_plugins:load(Plugin);
|
|
||||||
load_plugin(Node, Plugin) ->
|
|
||||||
rpc_call(Node, load_plugin, [Node, Plugin]).
|
|
||||||
|
|
||||||
unload_plugin(Node, Plugin) when Node =:= node() ->
|
|
||||||
emqx_plugins:unload(Plugin);
|
|
||||||
unload_plugin(Node, Plugin) ->
|
|
||||||
rpc_call(Node, unload_plugin, [Node, Plugin]).
|
|
||||||
|
|
||||||
reload_plugin(Node, Plugin) when Node =:= node() ->
|
|
||||||
emqx_plugins:reload(Plugin);
|
|
||||||
reload_plugin(Node, Plugin) ->
|
|
||||||
rpc_call(Node, reload_plugin, [Node, Plugin]).
|
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Listeners
|
%% Listeners
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue