2020-07-14 21:04:17 +08:00
|
|
|
%% This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
%% License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
2017-04-20 18:44:29 +08:00
|
|
|
%%
|
2023-01-02 12:17:36 +08:00
|
|
|
%% Copyright (c) 2020-2023 VMware, Inc. or its affiliates. All rights reserved.
|
2017-04-20 18:44:29 +08:00
|
|
|
%%
|
|
|
|
|
2021-03-04 21:22:48 +08:00
|
|
|
-include_lib("rabbit_common/include/logging.hrl").
|
|
|
|
|
|
|
|
-define(RMQLOG_DOMAIN_PEER_DIS, ?DEFINE_RMQLOG_DOMAIN(peer_discovery)).
|
|
|
|
|
2019-01-12 04:24:57 +08:00
|
|
|
% rabbitmq/rabbitmq-peer-discovery-aws#25
|
|
|
|
% Note: this timeout must not be greater than the default
|
|
|
|
% gen_server:call timeout of 5000ms. This `timeout`,
|
|
|
|
% when set, is used as the connect and then request timeout
|
|
|
|
% by `httpc`
|
|
|
|
-define(DEFAULT_HTTP_TIMEOUT, 2250).
|
|
|
|
|
2023-12-13 06:50:15 +08:00
|
|
|
-type peer_discovery_config_value() :: port()
|
|
|
|
| atom()
|
|
|
|
| integer()
|
|
|
|
| string()
|
|
|
|
| proplists:proplist()
|
|
|
|
| map()
|
|
|
|
| list()
|
|
|
|
| undefined.
|
2017-04-20 18:44:29 +08:00
|
|
|
|
|
|
|
-record(peer_discovery_config_entry_meta,
|
|
|
|
{env_variable :: string(),
|
|
|
|
default_value :: peer_discovery_config_value(),
|
|
|
|
type :: atom()}).
|
2019-12-29 22:04:03 +08:00
|
|
|
|
|
|
|
-type(peer_discovery_config_entry_meta() :: #peer_discovery_config_entry_meta{
|
|
|
|
type :: atom(),
|
|
|
|
env_variable :: string(),
|
|
|
|
default_value :: peer_discovery_config_value()
|
|
|
|
}).
|