Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suggestion] cherry.go 中的startup 方法建议将服务发现和集群创建的方法调换下位置 #28

Closed
huangweiboy2 opened this issue May 30, 2024 · 1 comment

Comments

@huangweiboy2
Copy link

旧代码:

if app.NodeMode() == Cluster {
cluster := ccluster.New()
app.SetCluster(cluster)
app.Register(cluster)

discovery := cdiscovery.New()
app.SetDiscovery(discovery)
app.Register(discovery)

}

新代码:

if app.NodeMode() == Cluster {
discovery := cdiscovery.New()
app.SetDiscovery(discovery)
app.Register(discovery)

	cluster := ccluster.New()
	app.SetCluster(cluster)
	app.Register(cluster)
}
@sandy1219
Copy link

好像没有什么影响吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants