chore: ekka support etcd v3

This commit is contained in:
DDDHuang 2021-05-28 14:54:22 +08:00 committed by turtleDeng
parent d65b6c5ef4
commit 9d1f6ccc4b
3 changed files with 13 additions and 1 deletions

View File

@ -109,6 +109,13 @@ cluster.autoclean = 5m
## Value: String
## cluster.etcd.server = "http://127.0.0.1:2379"
## Etcd api version
##
## Value: Enum
## - v2
## - v3
## cluster.etcd.version = v3
## The prefix helps build nodes path in etcd. Each node in the cluster
## will create a path in etcd: v2/keys/<prefix>/<cluster.name>/<node.name>
##

View File

@ -103,6 +103,10 @@
{datatype, string}
]}.
{mapping, "cluster.etcd.version", "ekka.cluster_discovery", [
{datatype, {enum, [v2, v3]}}
]}.
{mapping, "cluster.etcd.prefix", "ekka.cluster_discovery", [
{datatype, string}
]}.
@ -180,6 +184,7 @@
end, Options)
end,
[{server, string:tokens(cuttlefish:conf_get("cluster.etcd.server", Conf), ",")},
{version, cuttlefish:conf_get("cluster.etcd.version", Conf, v3)},
{prefix, cuttlefish:conf_get("cluster.etcd.prefix", Conf, "emqcl")},
{node_ttl, cuttlefish:conf_get("cluster.etcd.node_ttl", Conf, 60)},
{ssl_options, SslOpts(Conf)}];

View File

@ -41,7 +41,7 @@
, {jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}}
, {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.8.2"}}}
, {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.8.0"}}}
, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.8.1"}}}
, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.9.0"}}}
, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.5.1"}}}
, {cuttlefish, {git, "https://github.com/emqx/cuttlefish", {tag, "v4.0.0"}}}
, {minirest, {git, "https://github.com/emqx/minirest", {tag, "0.3.5"}}}