AlexStocks commented on PR #3245:
URL: https://github.com/apache/dubbo-go/pull/3245#issuecomment-4059306023
`metadata/report/etcd/report.go:120` — This PR migrates
`remoting/etcdv3/client.go` from `NewClient` to `NewClientWithOptions` (which
supports TLS, username, password), but `metadata/report/etcd/report.go` still
uses the old `NewClient` API:
```go
client, err := gxetcd.NewClient(gxetcd.MetadataETCDV3Client, addresses,
timeout, 1)
```
This inconsistency means metadata report will not benefit from TLS/auth
support, and if a future gost version removes `NewClient`, this file breaks.
**Suggestion**: Update to `NewClientWithOptions` for consistency:
```go
client, err := gxetcd.NewClientWithOptions(context.Background(),
&gxetcd.Options{
Name: gxetcd.MetadataETCDV3Client,
Endpoints: addresses,
Timeout: timeout,
Heartbeat: 1,
})
```
--
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]