fix: use unsupported loadbalance will cause nil pointer #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
我尝试在gateway中添加权重轮询的负载方式,因为算法需要,我修改了dispatch_runtime.go文件中的clusterRuntime结构体中的svrs里的数据,原先的其中存储了cluster中所有server的id,现在我将svrs中的数据改为*metapb.Server具体的实例。
我同时修改了Robin中Select()返回值的类型,原先返回的是index,现在返回的是serverId