Closed jebentier closed 3 years ago
@jebentier Yes indeed, the abstraction are poor for waiting for changes, but as you found it, support has been added for Service::get
. I would be glad to review it quickly and integrate it if you provide as PR.
Tell me if you need help
Regards
@pierresouchay Thank you for taking the time to respond. I've gone ahead and opened #222 with the necessary changes to port this functionality over. Please let me know if there is anything else that I can do.
@jebentier Thanks a lot for your contribution, very much appreciated!
I have merged it and created version 2.6.0, so you can use it easily.
FYI If you are watching a lot of Consul changes, you might also have a look at https://github.com/criteo/consul-templaterb which provides a much more hi-level API with many optimizations built-in (very efficient if you want to provide configuration files on changing environments as well)
Currently blocking read was added to
Diplomat::Service.get
, but not toDiplomat::Health.service
. It would be nice to have the ability to utilize the blocking read functionality when getting health status for services as well.