etcd-rb icon indicating copy to clipboard operation
etcd-rb copied to clipboard

Recursive watch/observe?

Open jphastings opened this issue 11 years ago • 0 comments

I can't seem to find a way to watch a directory on etcd. If I execute this:

client.observe('services') do |v, k, info|
  puts "v #{v}, k: #{k}, info: #{info}"
end

loop do; end

Then run this in my terminal:

$ etcdctl set services/test 127.0.0.1:12345

Nothing happens. However a terminal running this: etcdctl watch services --recursive returns the set value.

Looking at the code it seems no recursive option is (capable of) being passed, but the library also seems to be interacting exclusively with the v1 etcd api (it's hardcoded into the uri method) which may limit capability.

jphastings avatar Jan 23 '15 07:01 jphastings