Sha256: 9df1f376b8d83b83a258d042d2f7cc1725032fcd6bb77c8bcd9c813c85db3deb
Contents?: true
Size: 828 Bytes
Versions: 1
Compression:
Stored size: 828 Bytes
Contents
require "diplomat" require "dryad/core" require "dryad/consul/config_observer" require "dryad/consul/railtie" if defined?(Rails) require "dryad/consul/version" require "dryad/consul/service_registry" require "dryad/consul/service" require "dryad/consul/key_value_client" require "dryad/consul/config_provider" module Dryad module Consul class Error < StandardError; end class << self def configure_consul(configuration) consul = configuration.consul if consul[:username].nil? || consul[:password].nil? url = "http://#{consul[:host]}:#{consul[:port]}" else url = "http://#{consul[:username]}:#{consul[:password]}@#{consul[:host]}:#{consul[:port]}" end ::Diplomat.configure do |config| config.url = url end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dryad-consul-0.3.0 | lib/dryad/consul.rb |