diff options
author | Michael Klishin <michael@clojurewerkz.org> | 2020-01-28 21:04:40 +0300 |
---|---|---|
committer | Michael Klishin <michael@clojurewerkz.org> | 2020-01-28 21:06:14 +0300 |
commit | d621ec907a4b7f33e85e4bc61f10d1c6e1ef0601 (patch) | |
tree | 09408c7e63837c26f79469c2604a7841d03a5cbe /src | |
parent | 3f866531061a3c6fc2b9ce8556b3b228b7db71a9 (diff) | |
download | rabbitmq-server-git-d621ec907a4b7f33e85e4bc61f10d1c6e1ef0601.tar.gz |
rabbit_definitions: introduce a few types
Diffstat (limited to 'src')
-rw-r--r-- | src/rabbit_definitions.erl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/rabbit_definitions.erl b/src/rabbit_definitions.erl index 81d07b1140..8c70b5aa6c 100644 --- a/src/rabbit_definitions.erl +++ b/src/rabbit_definitions.erl @@ -37,6 +37,26 @@ %% API %% +-type definition_category() :: 'users' | + 'vhosts' | + 'permissions' | + 'topic_permissions' | + 'parameters' | + 'global_parameters' | + 'policies' | + 'queues' | + 'bindings' | + 'exchanges'. + +-type definition_object() :: #{binary() => any()}. +-type definition_list() :: [definition_object()]. + +-type definitions() :: #{ + definition_category() => definition_list() +}. + +-export_type([definition_object/0, definition_list/0, definition_category/0, definitions/0]). + maybe_load_definitions() -> %% this feature was a part of rabbitmq-management for a long time, %% so we check rabbit_management.load_definitions for backward compatibility. |