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


##########
cluster/router/tag/router.go:
##########
@@ -102,6 +104,30 @@ func (p *PriorityRouter) Notify(invokers []base.Invoker) {
        p.Process(&config_center.ConfigChangeEvent{Key: key, Value: value, 
ConfigType: remoting.EventTypeAdd})
 }
 
+// SetStaticConfig applies a RouterConfig directly, bypassing YAML parsing.
+// This is the correct entry point for static (code-configured) rules;
+// Process is designed for dynamic config-center updates that arrive as YAML 
text.
+// Static and dynamic rules are not merged: later Process updates replace the 
current state built here.
+func (p *PriorityRouter) SetStaticConfig(cfg *global.RouterConfig) {
+       if cfg == nil || len(cfg.Tags) == 0 {

Review Comment:
   已修复



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