LaurenceLiZhixin commented on a change in pull request #302:
URL: https://github.com/apache/dubbo-go-pixiu/pull/302#discussion_r753934161
##########
File path: pkg/adapter/dubboregistry/registry/registry.go
##########
@@ -75,9 +77,18 @@ func GetRegistry(name string, regConfig model.Registry,
listener common2.Registr
}
// CreateAPIConfig returns router.API struct base on the input
-func CreateAPIConfig(urlPattern string, dboBackendConfig
config.DubboBackendConfig, methodString string, mappingParams
[]config.MappingParam) router.API {
+func CreateAPIConfig(urlPattern, location string, dboBackendConfig
config.DubboBackendConfig, methodString string, mappingParams
[]config.MappingParam) router.API {
dboBackendConfig.Method = methodString
Review comment:
对于自动生成 api config 的场景,在adaptor层已经拿到了provider
的全量信息,完全可以拿出来provider的地址作为api config的一部分,在下面协议层调用时,无需再次服务发现,只做负载均衡即可。
负载均衡也可以在 adaptor 层和协议层之间,以filter 的形式来做。 @MasterKenway
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]