Class: Attio::CircuitBreakerClient Private
- Inherits:
-
Object
- Object
- Attio::CircuitBreakerClient
- Defined in:
- lib/attio/circuit_breaker.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wrapper for circuit breaker protected HTTP client
Instance Method Summary collapse
- #delete(path, body = nil) ⇒ Object private
- #get(path, params = nil) ⇒ Object private
-
#initialize(client, circuit_breaker) ⇒ CircuitBreakerClient
constructor
private
A new instance of CircuitBreakerClient.
- #patch(path, body = {}) ⇒ Object private
- #post(path, body = {}) ⇒ Object private
- #put(path, body = {}) ⇒ Object private
Constructor Details
#initialize(client, circuit_breaker) ⇒ CircuitBreakerClient
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CircuitBreakerClient.
217 218 219 220 |
# File 'lib/attio/circuit_breaker.rb', line 217 def initialize(client, circuit_breaker) @client = client @circuit_breaker = circuit_breaker end |
Instance Method Details
#delete(path, body = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
238 239 240 |
# File 'lib/attio/circuit_breaker.rb', line 238 def delete(path, body = nil) @circuit_breaker.call { @client.delete(path, body) } end |
#get(path, params = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
222 223 224 |
# File 'lib/attio/circuit_breaker.rb', line 222 def get(path, params = nil) @circuit_breaker.call { @client.get(path, params) } end |
#patch(path, body = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
230 231 232 |
# File 'lib/attio/circuit_breaker.rb', line 230 def patch(path, body = {}) @circuit_breaker.call { @client.patch(path, body) } end |
#post(path, body = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
226 227 228 |
# File 'lib/attio/circuit_breaker.rb', line 226 def post(path, body = {}) @circuit_breaker.call { @client.post(path, body) } end |
#put(path, body = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
234 235 236 |
# File 'lib/attio/circuit_breaker.rb', line 234 def put(path, body = {}) @circuit_breaker.call { @client.put(path, body) } end |