Aetherance commented on code in PR #3252:
URL: https://github.com/apache/dubbo-go/pull/3252#discussion_r2959110784


##########
client/options.go:
##########
@@ -467,6 +468,14 @@ func WithParam(k, v string) ReferenceOption {
        }
 }
 
+func WithRouter(routers ...*global.RouterConfig) ReferenceOption {
+       return func(opts *ReferenceOptions) {
+               if len(routers) > 0 {
+                       opts.Routers = append(opts.Routers, routers...)
+               }
+       }
+}

Review Comment:
   静态配置在 newRouterChain 阶段注入,相当于 RouterChain 的一次 
“初始化配置”。启动时会先加载并使用静态配置的路由规则。如果后续启用了动态配置的路由规则,静态配置规则会被动态配置规则直接替代。



-- 
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]

Reply via email to