Class: ContainersManager::Consul

Inherits:
Object
  • Object
show all
Defined in:
lib/containers_manager/entities/consul.rb

Instance Method Summary collapse

Constructor Details

#initialize(configuration, id_provider) ⇒ Consul

Returns a new instance of Consul.



3
4
5
6
# File 'lib/containers_manager/entities/consul.rb', line 3

def initialize(configuration, id_provider)
  @configuration = configuration
  @id_provider   = id_provider
end

Instance Method Details

#all_entriesObject



8
9
10
11
# File 'lib/containers_manager/entities/consul.rb', line 8

def all_entries
  @all_entries ||= response_from(consul_service_urls)
                     .map { |node| ConsulEntry.new(node, configuration).set_id_provider(id_provider) }
end