New style config schema: add more etcd backend settings
This commit is contained in:
parent
c067edd205
commit
a8b4641aad
|
|
@ -1,4 +1,4 @@
|
|||
%% host
|
||||
%% etcd host
|
||||
|
||||
{mapping, "cluster_formation.etcd.host", "rabbit.cluster_formation.peer_discovery_etcd.etcd_host", [
|
||||
{datatype, string}
|
||||
|
|
@ -12,6 +12,49 @@ fun(Conf) ->
|
|||
end
|
||||
end}.
|
||||
|
||||
%% etcd port
|
||||
|
||||
{mapping, "cluster_formation.etcd.port", "rabbit.cluster_formation.peer_discovery_etcd.etcd_port", [
|
||||
{datatype, integer},
|
||||
{validators, ["non_negative_integer"]}
|
||||
]}.
|
||||
|
||||
{translation, "rabbit.cluster_formation.peer_discovery_etcd.etcd_port",
|
||||
fun(Conf) ->
|
||||
case cuttlefish:conf_get("cluster_formation.etcd.port", Conf, undefined) of
|
||||
undefined -> cuttlefish:unset();
|
||||
Value -> Value
|
||||
end
|
||||
end}.
|
||||
|
||||
%% etcd scheme
|
||||
|
||||
{mapping, "cluster_formation.etcd.scheme", "rabbit.cluster_formation.peer_discovery_etcd.etcd_scheme", [
|
||||
{datatype, string}
|
||||
]}.
|
||||
|
||||
{translation, "rabbit.cluster_formation.peer_discovery_etcd.etcd_scheme",
|
||||
fun(Conf) ->
|
||||
case cuttlefish:conf_get("cluster_formation.etcd.scheme", Conf, undefined) of
|
||||
undefined -> cuttlefish:unset();
|
||||
Value -> Value
|
||||
end
|
||||
end}.
|
||||
|
||||
%% etcd key prefix
|
||||
|
||||
{mapping, "cluster_formation.etcd.key_prefix", "rabbit.cluster_formation.peer_discovery_etcd.etcd_prefix", [
|
||||
{datatype, string}
|
||||
]}.
|
||||
|
||||
{translation, "rabbit.cluster_formation.peer_discovery_etcd.etcd_prefix",
|
||||
fun(Conf) ->
|
||||
case cuttlefish:conf_get("cluster_formation.etcd.key_prefix", Conf, undefined) of
|
||||
undefined -> cuttlefish:unset();
|
||||
Value -> Value
|
||||
end
|
||||
end}.
|
||||
|
||||
%% ttl
|
||||
|
||||
{mapping, "cluster_formation.etcd.ttl", "rabbit.cluster_formation.peer_discovery_etcd.etcd_ttl", [
|
||||
|
|
|
|||
|
|
@ -9,6 +9,36 @@
|
|||
]}
|
||||
], [rabbitmq_peer_discovery_etcd]
|
||||
},
|
||||
{etcd_port, "cluster_formation.etcd.port = 7979", [
|
||||
{rabbit, [
|
||||
{cluster_formation, [
|
||||
{peer_discovery_etcd, [
|
||||
{etcd_port, 7979}
|
||||
]}
|
||||
]}
|
||||
]}
|
||||
], [rabbitmq_peer_discovery_etcd]
|
||||
},
|
||||
{etcd_key_prefix, "cluster_formation.etcd.scheme = https", [
|
||||
{rabbit, [
|
||||
{cluster_formation, [
|
||||
{peer_discovery_etcd, [
|
||||
{etcd_scheme, "https"}
|
||||
]}
|
||||
]}
|
||||
]}
|
||||
], [rabbitmq_peer_discovery_etcd]
|
||||
},
|
||||
{etcd_key_prefix, "cluster_formation.etcd.key_prefix = rabbit_", [
|
||||
{rabbit, [
|
||||
{cluster_formation, [
|
||||
{peer_discovery_etcd, [
|
||||
{etcd_prefix, "rabbit_"}
|
||||
]}
|
||||
]}
|
||||
]}
|
||||
], [rabbitmq_peer_discovery_etcd]
|
||||
},
|
||||
{etcd_ttl, "cluster_formation.etcd.ttl = 60", [
|
||||
{rabbit, [
|
||||
{cluster_formation, [
|
||||
|
|
|
|||
Loading…
Reference in New Issue