diff options
| author | Michael Klishin <michael@novemberain.com> | 2016-11-30 22:11:34 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-30 22:11:34 +0300 |
| commit | 8401de2f41fad32a887a648265faf9b32542b0f1 (patch) | |
| tree | 7fe12d7fdcd2af8096431a3c52a7b5ce5ac35e8a /src | |
| parent | 920f428356c736d76cbabba4422f08896e8ee7e9 (diff) | |
| parent | f565f251dbe20366c6e5f886c22c363bdd0a3e7e (diff) | |
| download | rabbitmq-server-git-8401de2f41fad32a887a648265faf9b32542b0f1.tar.gz | |
Merge pull request #1045 from rabbitmq/rabbitmq-cli-131
Add function returning active plugins and versions
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_plugins.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index 453e6bf46c..b7ba3af732 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -18,7 +18,7 @@ -include("rabbit.hrl"). -include_lib("stdlib/include/zip.hrl"). --export([setup/0, active/0, read_enabled/1, list/1, list/2, dependencies/3]). +-export([setup/0, active/0, read_enabled/1, list/1, list/2, dependencies/3, running_plugins/0]). -export([ensure/1]). -export([extract_schemas/1]). -export([validate_plugins/1, format_invalid_plugins/1]). @@ -211,6 +211,13 @@ is_loadable(App) -> _ -> false end. + +%% List running plugins along with their version. +-spec running_plugins() -> [{atom(), Vsn :: string()}]. +running_plugins() -> + ActivePlugins = active(), + {ok, [{App, Vsn} || {App, _ , Vsn} <- rabbit_misc:which_applications(), lists:member(App, ActivePlugins)]}. + %%---------------------------------------------------------------------------- prepare_plugins(Enabled) -> |
