marsevilspirit commented on PR #2900:
URL: https://github.com/apache/dubbo-go/pull/2900#issuecomment-2919516584
> Overall it's a very clear PR. I wonder if the compatibility with the old
config has been verified.
I have done my utmost to ensure compatibility with the old configuration,
but there is one aspect that has not been achieved.
@@ -798,13 +805,18 @@
client/options.go
```go
-func WithClientProtocol(protocol string) ClientOption {
- return func(opts *ClientOptions) {
- opts.Consumer.Protocol = protocol
+func WithClientProtocol(opts ...protocol.ClientOption) ClientOption {
+ proOpts := protocol.NewClientOptions(opts...)
+
+ return func(srvOpts *ClientOptions) {
+ if srvOpts.overallReference.ProtocolClientConfig == nil {
+ srvOpts.overallReference.ProtocolClientConfig =
new(global.ProtocolClientConfig)
+ }
+ srvOpts.overallReference.ProtocolClientConfig =
proOpts.ProtocolClient
}
}
```
This API i changed.
So there is a **breaking change** actually.
But I think no one will use this option, because we have
`WithClientProtocolXXX()` option, we only use `WithClientProtocolXXX()` option
in dubbo-go-samples.
--
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]