Do not pass the config object to newCluster

Decouple the config structure from the cluster management and
stop passing the config object around.
This commit is contained in:
kaiyou
2020-05-06 19:19:55 +02:00
committed by Leo Antunes
parent 97525f4b10
commit 366f906d5d
2 changed files with 8 additions and 10 deletions

View File

@ -42,7 +42,7 @@ func main() {
}, limit)
}
cluster, err := newCluster(config, getMeta)
cluster, err := newCluster(config.Init, config.ClusterKey, config.BindAddr, config.BindIface, config.ClusterPort, config.UseIPAsName, getMeta)
if err != nil {
logrus.WithError(err).Fatal("could not create cluster")
}