class ConsulSyncer::Endpoint

Public Class Methods

new(service_hash) click to toggle source
# File lib/consul_syncer/endpoint.rb, line 4
def initialize(service_hash)
  @hash = service_hash
end

Public Instance Methods

ip() click to toggle source
# File lib/consul_syncer/endpoint.rb, line 32
def ip
  @hash.fetch('Node').fetch('Address')
end
name() click to toggle source
# File lib/consul_syncer/endpoint.rb, line 8
def name
  @hash.fetch('Service').fetch('Service')
end
node() click to toggle source
# File lib/consul_syncer/endpoint.rb, line 20
def node
  @hash.fetch('Node').fetch('Node')
end
port() click to toggle source
# File lib/consul_syncer/endpoint.rb, line 24
def port
  @hash.fetch('Service').fetch('Port')
end
service_address() click to toggle source
# File lib/consul_syncer/endpoint.rb, line 16
def service_address
  @hash.fetch('Service').fetch('Address')
end
service_id() click to toggle source
# File lib/consul_syncer/endpoint.rb, line 12
def service_id
  @hash.fetch('Service').fetch('ID')
end
tags() click to toggle source
# File lib/consul_syncer/endpoint.rb, line 28
def tags
  @hash.fetch('Service').fetch('Tags', [])
end