Class: Consul::Client::V1
- Inherits:
-
Object
- Object
- Consul::Client::V1
- Defined in:
- lib/consul/client.rb
Overview
Do not instantiate this class directly.
Instance Method Summary collapse
-
#http(host: "localhost", port: 8500, logger: NULL_LOGGER) ⇒ Consul::Client::HTTP
Returns a thin wrapper around the Consult HTTP API.
-
#local_service(name, http: Consul::Client.v1.http(), logger: http.logger) ⇒ Consul::Client::LocalService
Returns high-level local service utility functions.
-
#service(*args) ⇒ Object
Returns high-level service utility functions.
Instance Method Details
#http(host: "localhost", port: 8500, logger: NULL_LOGGER) ⇒ Consul::Client::HTTP
Returns a thin wrapper around the Consult HTTP API.
56 57 58 |
# File 'lib/consul/client.rb', line 56 def http(host: "localhost", port: 8500, logger: NULL_LOGGER) HTTP.new(host: host, port: port, logger: logger) end |
#local_service(name, http: Consul::Client.v1.http(), logger: http.logger) ⇒ Consul::Client::LocalService
Returns high-level local service utility functions.
34 35 36 |
# File 'lib/consul/client.rb', line 34 def local_service(name, http:Consul::Client.v1.http(), logger:http.logger) LocalService.new(name, http: http, logger: logger) end |
#service(*args) ⇒ Object
Returns high-level service utility functions.
43 44 45 |
# File 'lib/consul/client.rb', line 43 def service(*args) Service.new(*args) end |