diff options
| author | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-09-08 16:50:29 +0100 |
|---|---|---|
| committer | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-10-07 08:46:40 +0100 |
| commit | ed1a42feb501e7d03f9386ddda5631e93bde1fdc (patch) | |
| tree | fe228305cd3967db239e4cfd0349569933d4e343 /src | |
| parent | ae305dc2ad51be7d8aa2ef803edbfe49e7334231 (diff) | |
| download | rabbitmq-server-git-ed1a42feb501e7d03f9386ddda5631e93bde1fdc.tar.gz | |
Adds info_all/4 for dynamic display of exchanges.
References #62
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_exchange.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl index 459334455f..ce5af25d41 100644 --- a/src/rabbit_exchange.erl +++ b/src/rabbit_exchange.erl @@ -22,7 +22,7 @@ assert_equivalence/6, assert_args_equivalence/2, check_type/1, lookup/1, lookup_or_die/1, list/0, list/1, lookup_scratch/2, update_scratch/3, update_decorators/1, immutable/1, - info_keys/0, info/1, info/2, info_all/1, info_all/2, + info_keys/0, info/1, info/2, info_all/1, info_all/2, info_all/4, route/2, delete/2, validate_binding/2]). %% these must be run inside a mnesia tx -export([maybe_auto_delete/2, serial/1, peek_serial/1, update/2]). @@ -82,6 +82,9 @@ -spec(info_all/1 :: (rabbit_types:vhost()) -> [rabbit_types:infos()]). -spec(info_all/2 ::(rabbit_types:vhost(), rabbit_types:info_keys()) -> [rabbit_types:infos()]). +-spec(info_all/4 ::(rabbit_types:vhost(), rabbit_types:info_keys(), + reference(), pid()) + -> 'ok'). -spec(route/2 :: (rabbit_types:exchange(), rabbit_types:delivery()) -> [rabbit_amqqueue:name()]). -spec(delete/2 :: @@ -340,6 +343,11 @@ info_all(VHostPath) -> map(VHostPath, fun (X) -> info(X) end). info_all(VHostPath, Items) -> map(VHostPath, fun (X) -> info(X, Items) end). +info_all(VHostPath, Items, Ref, Pid) -> + map(VHostPath, fun (X) -> Pid ! {Ref, info(X, Items)} end), + Pid ! {Ref, finished}, + ok. + route(#exchange{name = #resource{virtual_host = VHost, name = RName} = XName, decorators = Decorators} = X, #delivery{message = #basic_message{routing_keys = RKs}} = Delivery) -> |
