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:
2
main.go
2
main.go
@ -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")
|
||||
}
|
||||
|
Reference in New Issue
Block a user