Class: Dryad::Consul::ConfigProvider
- Inherits:
-
Dryad::Core::ConfigProvider
- Object
- Dryad::Core::ConfigProvider
- Dryad::Consul::ConfigProvider
- Defined in:
- lib/dryad/consul/config_provider.rb
Class Method Summary collapse
Class Method Details
.load(path, listener = nil) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/dryad/consul/config_provider.rb', line 5 def load(path, listener = nil) config = Dryad::Consul::KeyValueClient.get(path) if config.nil? raise Dryad::Core::ConfigurationNotFound, path else Dryad::Core::ConfigDesc.new(path, config.Value, config.ModifyIndex) end end |