diff options
author | Michael Klishin <mklishin@pivotal.io> | 2017-03-22 02:42:46 +0300 |
---|---|---|
committer | Michael Klishin <mklishin@pivotal.io> | 2017-03-22 02:42:46 +0300 |
commit | c0ad88e6c2ad34a216733eb9f766911ff9669f80 (patch) | |
tree | 176bf4dfc0412b20d037d8582de5867598e5bb48 /src/rabbit_peer_discovery_dns.erl | |
parent | 5565bb9320656533ad1fea78a8c6d2ff57b4a3e1 (diff) | |
download | rabbitmq-server-git-c0ad88e6c2ad34a216733eb9f766911ff9669f80.tar.gz |
Register with peer discovery backend on start if the backend supports it
This introduces a new function to the peer discovery interface.
The idea is to let backends indicate if they support registration.
The goal is not to avoid calling the function, since Erlang
behaviours require all functions to be implemented anyway.
What we are trying to avoid with this is extra log entries
that say "[un]registering with ..." as they can be confusing
e.g. in single node installations.
References #1143.
Diffstat (limited to 'src/rabbit_peer_discovery_dns.erl')
-rw-r--r-- | src/rabbit_peer_discovery_dns.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rabbit_peer_discovery_dns.erl b/src/rabbit_peer_discovery_dns.erl index 05102bebab..6082f823b6 100644 --- a/src/rabbit_peer_discovery_dns.erl +++ b/src/rabbit_peer_discovery_dns.erl @@ -19,7 +19,7 @@ -include("rabbit.hrl"). --export([list_nodes/0, register/0, unregister/0]). +-export([list_nodes/0, supports_registration/0, register/0, unregister/0]). %% for tests -export([discover_nodes/2, discover_hostnames/2]). @@ -48,6 +48,13 @@ list_nodes() -> end end. + +-spec supports_registration() -> boolean(). + +supports_registration() -> + false. + + -spec register() -> ok. register() -> |