Class: Attio::CircuitBreakerClient Private

Inherits:
Object
  • Object
show all
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

Since:

  • 1.0.0

API:

  • private

Instance Method Summary collapse

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.

Since:

  • 1.0.0

API:

  • private



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.

Since:

  • 1.0.0

API:

  • private



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.

Since:

  • 1.0.0

API:

  • private



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.

Since:

  • 1.0.0

API:

  • private



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.

Since:

  • 1.0.0

API:

  • private



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.

Since:

  • 1.0.0

API:

  • private



234
235
236
# File 'lib/attio/circuit_breaker.rb', line 234

def put(path, body = {})
  @circuit_breaker.call { @client.put(path, body) }
end