From 514ce3d588608c96744fc72f6d8c1d3d9bbdb41f Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期二, 06 八月 2019 16:54:11 +0800 Subject: [PATCH] 增加查找集群的代码:实现方式是集群的节点定时广播自身信息到某个广播地址端口,新节点通过该广播地址端口和密码获取该信息并解析 --- config.go | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/config.go b/config.go index 91ea106..cabf62a 100644 --- a/config.go +++ b/config.go @@ -39,6 +39,9 @@ tagKeyClusterID = "syncer-cluster-name" TagKeyClusterPort = "syncer-cluster-port" TagKeyRPCPort = "syncer-rpc-port" + BroadcastIP = "255.255.255.255" + BroadcastPort = 30193 + BroadcastInterval = 5 ) // DefaultConfig default config -- Gitblit v1.8.0