Class: Serverspec::Type::ConsulService

Inherits:
ConsulBase show all
Defined in:
lib/serverspec_extra_types/types/consul_service.rb

Instance Method Summary collapse

Methods inherited from ConsulBase

#[], #initialize

Methods inherited from ApiBase

#[], #initialize

Constructor Details

This class inherits a constructor from Serverspec::Type::ConsulBase

Instance Method Details

#inspectionObject



18
19
20
# File 'lib/serverspec_extra_types/types/consul_service.rb', line 18

def inspection
  @inspection ||= ::MultiJson.load(get_inspection.stdout)
end

#to_sObject



12
13
14
15
16
# File 'lib/serverspec_extra_types/types/consul_service.rb', line 12

def to_s
  msg = "Consul Service #{@name}"
  msg << %( with acl token: "#{@token}") if @token
  msg
end

#urlObject



8
9
10
# File 'lib/serverspec_extra_types/types/consul_service.rb', line 8

def url
  "#{@url_base}/v1/catalog/service/#{@name}"
end