- Defined in:
Watcher for watching Zookeeper for entries containing DNS names that are continuously resolved to IP Addresses. The use case for this watcher is to allow services that are addressed by DNS to be reconfigured via Zookeeper instead of an update of the synapse config.
The implementation builds on top of the existing DNS and Zookeeper watchers. This watcher creates a thread to manage the lifecycle of the DNS and Zookeeper watchers. This thread also publishes messages on a queue to indicate that DNS should be re-resolved (after the check interval) or that the DNS watcher should be shut down. The Zookeeper watcher waits for changes in backends from zookeeper and publishes those changes on an internal queue consumed by the DNS watcher. The DNS watcher blocks on this queue waiting for messages indicating that new servers are available, the check interval has passed (triggering a re-resolve), or that the watcher should shut down. The DNS watcher is responsible for the actual reconfiguring of backends.
Defined Under Namespace
Modules:Classes: , , , , , , , ,
Constant Summary collapse
- VERSION =
Instance Method Summary collapse
Instance Method Details
#log ⇒ Object
2 3 4
# File 'lib/synapse/base.rb', line 2 def log @@log ||= Logger.new(STDERR) end