AlexStocks commented on code in PR #2934:
URL: https://github.com/apache/dubbo-go/pull/2934#discussion_r2191302148
##########
compat.go:
##########
@@ -395,6 +396,65 @@ func compatMetricPrometheusConfig(c
*global.PrometheusConfig) *config.Prometheus
}
}
+func compatReferences(c map[string]*global.ReferenceConfig)
map[string]*config.ReferenceConfig {
+ if c == nil {
+ return nil
+ }
+ refs := make(map[string]*config.ReferenceConfig, len(c))
+ for name, ref := range c {
+ refs[name] = &config.ReferenceConfig{
+ InterfaceName: ref.InterfaceName,
+ Check: ref.Check,
+ URL: ref.URL,
+ Filter: ref.Filter,
+ Protocol: ref.Protocol,
+ RegistryIDs: ref.RegistryIDs,
+ Cluster: ref.Cluster,
+ Loadbalance: ref.Loadbalance,
+ Retries: ref.Retries,
+ Group: ref.Group,
+ Version: ref.Version,
+ Serialization: ref.Serialization,
+ ProvidedBy: ref.ProvidedBy,
+ Methods:
compatMethodsConfig(ref.MethodsConfig),
+ Async: ref.Async,
+ Params: ref.Params,
+ Generic: ref.Generic,
+ Sticky: ref.Sticky,
+ RequestTimeout: ref.RequestTimeout,
+ ForceTag: ref.ForceTag,
+ TracingKey: ref.TracingKey,
+ MeshProviderPort: ref.MeshProviderPort,
+ }
+ }
+ return refs
+}
+
+func compatMethodsConfig(methods []*global.MethodConfig)
[]*config.MethodConfig {
+ if methods == nil {
Review Comment:
同上。添加注释和测试case
--
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]