diff options
| author | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-09-08 15:04:21 +0100 |
|---|---|---|
| committer | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-10-07 08:46:40 +0100 |
| commit | 19fa31319b4e50e207d59d668c6ec4fbcf2052c0 (patch) | |
| tree | a023cf1c73ee3d47aa973988d8a642e38f3c98ee /src | |
| parent | 4dd0bc19277187ff1012c02dd160b33eff54c9d8 (diff) | |
| download | rabbitmq-server-git-19fa31319b4e50e207d59d668c6ec4fbcf2052c0.tar.gz | |
Adds info_all/3 for dynamic listing of channels.
References #62
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index f8ed9cae9f..125b85cfc3 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -55,7 +55,8 @@ -export([start_link/11, do/2, do/3, do_flow/3, flush/1, shutdown/1]). -export([send_command/2, deliver/4, deliver_reply/2, send_credit_reply/2, send_drained/2]). --export([list/0, info_keys/0, info/1, info/2, info_all/0, info_all/1]). +-export([list/0, info_keys/0, info/1, info/2, info_all/0, info_all/1, + info_all/3]). -export([refresh_config_local/0, ready_for_close/1]). -export([force_event_refresh/1]). @@ -218,6 +219,7 @@ -spec(info/2 :: (pid(), rabbit_types:info_keys()) -> rabbit_types:infos()). -spec(info_all/0 :: () -> [rabbit_types:infos()]). -spec(info_all/1 :: (rabbit_types:info_keys()) -> [rabbit_types:infos()]). +-spec(info_all/3 :: (rabbit_types:info_keys(), reference(), pid()) -> 'ok'). -spec(refresh_config_local/0 :: () -> 'ok'). -spec(ready_for_close/1 :: (pid()) -> 'ok'). -spec(force_event_refresh/1 :: (reference()) -> 'ok'). @@ -325,6 +327,12 @@ info_all() -> info_all(Items) -> rabbit_misc:filter_exit_map(fun (C) -> info(C, Items) end, list()). +info_all(Items, Ref, Pid) -> + rabbit_misc:filter_exit_map(fun (C) -> Pid ! {Ref, info(C, Items)} end, + list()), + Pid ! {Ref, finished}, + ok. + refresh_config_local() -> rabbit_misc:upmap( fun (C) -> gen_server2:call(C, refresh_config, infinity) end, |
