Request
Could go-zero expose etcd client's AutoSyncInterval in EtcdConf?
For example, users could disable etcd endpoint auto-sync when needed:
Etcd:
Hosts:
- 127.0.0.1:2479
Key: device.rpc
AutoSyncInterval: 0s # disables auto-sync
Why
go-zero's etcd discovery creates the etcd client internally, so users cannot
control this option today.
This matters when applications should keep using the configured Etcd.Hosts,
such as an etcd LB / VIP / proxy.
The underlying etcd client already supports this through
clientv3.Config.AutoSyncInterval.
Related case
Related: #5005. The user configured 127.0.0.1:2479, but auto-sync tried to
connect to 127.0.0.1:2379 after reading etcd membership.
Disabling auto-sync was suggested there, which looks like a reasonable option
for that kind of setup. It just is not available through EtcdConf today.
Request
Could go-zero expose etcd client's
AutoSyncIntervalinEtcdConf?For example, users could disable etcd endpoint auto-sync when needed:
Why
go-zero's etcd discovery creates the etcd client internally, so users cannot
control this option today.
This matters when applications should keep using the configured
Etcd.Hosts,such as an etcd LB / VIP / proxy.
The underlying etcd client already supports this through
clientv3.Config.AutoSyncInterval.Related case
Related: #5005. The user configured
127.0.0.1:2479, but auto-sync tried toconnect to
127.0.0.1:2379after reading etcd membership.Disabling auto-sync was suggested there, which looks like a reasonable option
for that kind of setup. It just is not available through
EtcdConftoday.