You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/07/17 04:50:55 UTC

[GitHub] [dubbo-go] LaurenceLiZhixin commented on issue #1321: 为什么使用`func () cluster.LoadBalance` 作为入参?

LaurenceLiZhixin commented on issue #1321:
URL: https://github.com/apache/dubbo-go/issues/1321#issuecomment-881827662


   1. 为什么现在这么做:使用工厂函数的原因就是防止一个实例被多次使用,如果用户定义的实例内有map字段,会造成线程安全问题,多个地方都会改动同一个实例也会造成逻辑错乱。
   2. 现有工厂函数并没有提供入参,这的确不好。我认为这一点需要针对3.0重新定义。给一个用户可扩展参数metaadata,类型可以是interface。
   @JiaLiangoooo 您觉得如何。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org