Class: HealtcheckProxyClient::Client
- Inherits:
-
Object
- Object
- HealtcheckProxyClient::Client
- Extended by:
- Forwardable
- Defined in:
- lib/healtcheck_proxy_client/client.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(configuration:, healthcheck:) ⇒ Client
constructor
A new instance of Client.
- #ping ⇒ Object
Constructor Details
#initialize(configuration:, healthcheck:) ⇒ Client
Returns a new instance of Client.
7 8 9 10 |
# File 'lib/healtcheck_proxy_client/client.rb', line 7 def initialize(configuration:, healthcheck:) @configuration = configuration @healthcheck = healthcheck end |
Class Method Details
.ping(configuration:, healthcheck:) ⇒ Object
12 13 14 |
# File 'lib/healtcheck_proxy_client/client.rb', line 12 def self.ping(configuration:, healthcheck:) new(configuration: configuration, healthcheck: healthcheck).ping end |
Instance Method Details
#ping ⇒ Object
16 17 18 19 20 |
# File 'lib/healtcheck_proxy_client/client.rb', line 16 def ping Faraday.get(url) rescue Faraday::Error => e raise HttpError.new(e., http_error: e) end |