Class: Porkadot::Configs::Etcd

Inherits:
Object
  • Object
show all
Includes:
Porkadot::ConfigUtils
Defined in:
lib/porkadot/configs/etcd.rb

Instance Method Summary collapse

Methods included from Porkadot::ConfigUtils

#asset_path, #config, #logger, #method_missing, #raw, #respond_to_missing?, #secrets_path

Constructor Details

#initialize(config) ⇒ Etcd

Returns a new instance of Etcd.



6
7
8
9
# File 'lib/porkadot/configs/etcd.rb', line 6

def initialize config
  @config = config
  @raw = config.raw.etcd
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Porkadot::ConfigUtils

Instance Method Details



11
12
13
14
15
16
17
# File 'lib/porkadot/configs/etcd.rb', line 11

def advertise_client_urls
  urls = []
  config.etcd_nodes.each do |_, v|
    urls += v.advertise_client_urls
  end
  return urls
end