summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_vhost.erl10
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.