Open oakad opened 9 years ago
I have not kept this up to date. I am not sure when or if I can come back to it. I thought we would be using etcd a lot but we don't. I spent most of my time working with Consul. You are welcome to fork this and add changes at will.
A common pattern while using etcd is waiting on some key to change (using etcd.wait(handler, ...) in this library's case). A common sub-case of the above pattern is that
wait
request never invokes its handler (because no changes were detected or application has to shut down or do some other modifications to its run time state).Therefore, it will be handy to have a way to cancel those requests without waiting for completion, both individually and all pending requests at once. The later appears to be easy to achieve by exposing the
scheduledExecutorService
in theEtcdClient
and using itsshutdown()
andawaitTermination()
methods.