Closed eaglc closed 3 years ago
For microservices, you can access those services only those services are registered. So it is a reasonable.
For microservices, you can access those services only those services are registered. So it is a reasonable.
I agree with this.
The resulting problems are: The function NewEtcdV3Discovery return with success.
client/etcdv3_discovery.go line:59
then the d.watch goroutine exits (due to the directory does not exist) and my client cant not perceive it.
store/etcdv3/etcdv3.go line:294
As a result, my client kept running, but it can no longer find the service even after the service is registered.
Is there a contradiction here?
It is a problem. This plugin must check existence and return an error if the watched path doesn't exist
Here we should return the error if err == store.ErrKeyNotFound.
Great! Look forward to fix soon.
thk
When I watch a directory that does not exist, EtcdV3Discovery immediately exits. I want to know whether this logic reasonable? In this case, we must strictly ensure the startup sequence of the service or persist the directory to etcd in advance. But in my application scenario, I Don't want to care about these.
tks