基于serf的数据库同步模块库
liuxiaolong
2021-05-31 a371b5f962bdac6c27155579237eb8ac870e23ce
fix Init arg
1个文件已修改
6 ■■■■ 已修改文件
agent.go 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
agent.go
@@ -276,8 +276,8 @@
}
//Init serf Init
func Init(clusterID string, password string, nodeID string, addrs []string, snapshotPath string, hef HandleEventFunc) (*Agent, error) {
    agent, err := InitNode(clusterID, password, nodeID, snapshotPath, hef)
func Init(clusterID string, password string, nodeID string, addrs []string, snapshotPath string) (*Agent, error) {
    agent, err := InitNode(clusterID, password, nodeID, snapshotPath)
    if err != nil {
        logger.Error("InitNode failed, error: %s", err)
        return agent, err
@@ -293,7 +293,7 @@
}
//InitNode web后台收到创建集群的请求,
func InitNode(clusterID string, password string, nodeID string, snapshotPath string, hef HandleEventFunc) (*Agent, error) {
func InitNode(clusterID string, password string, nodeID string, snapshotPath string) (*Agent, error) {
    conf := DefaultConfig()
    logger.Info("clusterID:", clusterID, "password:", password, "nodeID:", nodeID)
    conf.ClusterID = clusterID