Sha256: 56fb97c5e9448f2d8aceec86d42b77c2e16468b08b8de94edf75fe0b32570266

Contents?: true

Size: 435 Bytes

Versions: 10

Compression:

Stored size: 435 Bytes

Contents

module Dryad
  module Consul
    class ConfigProvider < Dryad::Core::ConfigProvider
      class << self
        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
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
dryad-consul-0.2.7 lib/dryad/consul/config_provider.rb
dryad-consul-0.2.6 lib/dryad/consul/config_provider.rb
dryad-0.2.5 dryad-consul/lib/dryad/consul/config_provider.rb
dryad-consul-0.2.5 lib/dryad/consul/config_provider.rb
dryad-0.2.3 dryad-consul/lib/dryad/consul/config_provider.rb
dryad-consul-0.2.3 lib/dryad/consul/config_provider.rb
dryad-0.2.1 dryad-consul/lib/dryad/consul/config_provider.rb
dryad-consul-0.2.1 lib/dryad/consul/config_provider.rb
dryad-0.2.0 dryad-consul/lib/dryad/consul/config_provider.rb
dryad-consul-0.2.0 lib/dryad/consul/config_provider.rb