Similarityoung opened a new pull request, #862: URL: https://github.com/apache/dubbo-go-pixiu/pull/862
<!-- Thanks for sending a pull request! --> ### **What this PR does**: This pull request significantly refactors and extends the Dubbo client configuration and integration logic to support more flexible and feature-rich Dubbo proxying. The main changes include expanding the `DubboProxyConfig` struct with new fields and helpers, updating the Dubbo client creation to use the latest dubbo-go v3.3.1 client API, and adding comprehensive unit tests for the new configuration options. Key changes: **DubboProxyConfig Enhancements** * Added new fields to `DubboProxyConfig` for advanced Dubbo features: `Cluster`, `Check`, `Protocol`, `Filter`, `Serialization`, `Sticky`, and `Params`, each with documentation and sensible defaulting logic. Helper methods (`GetCluster`, `GetProtocol`, `GetCheck`) were introduced to provide default values and maintain backward compatibility. **Dubbo Client Refactor** * Switched Dubbo client initialization from the old `dg.RootConfig` approach to the new `dclient.NewClient` API, updating the registry and application configuration handling to use `global.RegistryConfig` and `global.ApplicationConfig`. [[1]](diffhunk://#diff-1f73347753bf43f97bf0ecd965437bb343d893ca0884e7707ddbe40aaef841cbR23-L34) [[2]](diffhunk://#diff-1f73347753bf43f97bf0ecd965437bb343d893ca0884e7707ddbe40aaef841cbL84-R85) [[3]](diffhunk://#diff-1f73347753bf43f97bf0ecd965437bb343d893ca0884e7707ddbe40aaef841cbL98-R100) [[4]](diffhunk://#diff-1f73347753bf43f97bf0ecd965437bb343d893ca0884e7707ddbe40aaef841cbL136-R168) * Refactored the service reference creation logic to use a new `buildReferenceOptions` method, which builds the reference configuration using the new API and applies all advanced options from `DubboProxyConfig` and the integration request. This enables support for all new configuration fields and ensures correct option precedence. **Testing** * Added comprehensive unit tests in `config_test.go` to verify the new configuration fields and helper methods, including edge cases for defaulting and explicit configuration. ### **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* --> Fixes #631 -- 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]
