summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2020-03-16 12:35:55 +0300
committerMichael Klishin <michael@clojurewerkz.org>2020-03-16 12:35:55 +0300
commit8a4fa255ddef8e6e488c89dc1735d9a6d0243a9c (patch)
tree9dbac089a0ab6cee408cfb00e836761217de7d0e
parent03c6635fdfa8ec40fef8519e6f54107549fc33dc (diff)
downloadrabbitmq-server-git-8a4fa255ddef8e6e488c89dc1735d9a6d0243a9c.tar.gz
rabbit_nodes: introduce make/2 for convenience
Pair: @dumbbell.
-rw-r--r--src/rabbit_nodes.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rabbit_nodes.erl b/src/rabbit_nodes.erl
index d38bd46018..1f066c6b91 100644
--- a/src/rabbit_nodes.erl
+++ b/src/rabbit_nodes.erl
@@ -17,7 +17,7 @@
-module(rabbit_nodes).
--export([names/1, diagnostics/1, make/1, parts/1, cookie_hash/0,
+-export([names/1, diagnostics/1, make/1, make/2, parts/1, cookie_hash/0,
is_running/2, is_process_running/2,
cluster_name/0, set_cluster_name/1, set_cluster_name/2, ensure_epmd/0,
all_running/0, name_type/0, running_count/0,
@@ -55,8 +55,11 @@ names(Hostname) ->
diagnostics(Nodes) ->
rabbit_nodes_common:diagnostics(Nodes).
-make(NodeStr) ->
- rabbit_nodes_common:make(NodeStr).
+make(NameOrParts) ->
+ rabbit_nodes_common:make(NameOrParts).
+
+make(ShortName, Hostname) ->
+ make({ShortName, Hostname}).
parts(NodeStr) ->
rabbit_nodes_common:parts(NodeStr).