diff options
| author | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-09-08 17:22:45 +0100 |
|---|---|---|
| committer | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-10-07 08:46:41 +0100 |
| commit | 67d44a48a0cebe0b11bb8b881d6023278218ee1c (patch) | |
| tree | 2399d6ed8c519bcd5a2e5b057e190e1307476b41 /src | |
| parent | 8320c4d3e477921de62ebe9e5502fec31b8c0455 (diff) | |
| download | rabbitmq-server-git-67d44a48a0cebe0b11bb8b881d6023278218ee1c.tar.gz | |
Adds info_all/3 for dynamic display of vhosts.
References #62
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_vhost.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rabbit_vhost.erl b/src/rabbit_vhost.erl index 9b627adf5d..0783eb61d7 100644 --- a/src/rabbit_vhost.erl +++ b/src/rabbit_vhost.erl @@ -21,7 +21,7 @@ %%---------------------------------------------------------------------------- -export([add/1, delete/1, exists/1, list/0, with/2, assert/1]). --export([info/1, info/2, info_all/0, info_all/1]). +-export([info/1, info/2, info_all/0, info_all/1, info_all/2, info_all/3]). -ifdef(use_specs). @@ -37,6 +37,8 @@ -> 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()) -> + [rabbit_types:infos()]). -endif. @@ -153,3 +155,9 @@ info(VHost, Items) -> infos(Items, VHost). info_all() -> info_all(?INFO_KEYS). info_all(Items) -> [info(VHost, Items) || VHost <- list()]. + +info_all(Pid, Ref) -> info_all(?INFO_KEYS, Pid, Ref). +info_all(Items, Pid, Ref) -> [Pid ! {Ref, info(VHost, Items)} || + VHost <- list()], + Pid ! {Ref, finished}, + ok. |
