summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-03-27 15:37:32 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-03-27 15:37:32 +0100
commit772fe7a6e8ce64d84b057716f48a692b65092346 (patch)
tree939b724abe980c3f01010cbfdca7c5de47074b61
parent50804c7a1ff01d028c4a76004dc14e1f19408660 (diff)
downloadrabbitmq-server-772fe7a6e8ce64d84b057716f48a692b65092346.tar.gz
More API
-rw-r--r--src/rabbit_runtime_parameters.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rabbit_runtime_parameters.erl b/src/rabbit_runtime_parameters.erl
index 305afb25..d78725df 100644
--- a/src/rabbit_runtime_parameters.erl
+++ b/src/rabbit_runtime_parameters.erl
@@ -18,8 +18,8 @@
-include("rabbit.hrl").
--export([parse/1, set/3, clear/2, list/0, list_formatted/0, lookup/2, value/2,
- value/3, info_keys/0]).
+-export([parse/1, set/3, clear/2, list/0, list/1, list_formatted/0, lookup/2,
+ value/2, value/3, info_keys/0]).
-import(rabbit_misc, [pget/2, pset/3]).
@@ -45,7 +45,11 @@ clear(AppName, Key) ->
end).
list() ->
- [p(Param) || Param <- rabbit_misc:dirty_read_all(?TABLE)].
+ [p(P) || P <- rabbit_misc:dirty_read_all(?TABLE)].
+
+list(Name) ->
+ [p(P) || P <- mnesia:dirty_match_object(
+ ?TABLE, #runtime_parameters{key = {Name, '_'}, _ = '_'})].
list_formatted() ->
[pset(value, format(pget(value, P)), P) || P <- list()].