sig/plugins/circuit_breaker.rbs in httpx-0.24.7 vs sig/plugins/circuit_breaker.rbs in httpx-1.0.0
- old
+ new
@@ -1,19 +1,21 @@
module HTTPX
module Plugins
module CircuitBreaker
class CircuitStore
- @circuits: Hash[String, Circuit]
+ @circuits: Hash[String, Circuit] & Mutex_m
- def try_open: (generic_uri uri, response response) -> response?
+ def try_open: (uri uri, response response) -> response?
def try_respond: (Request request) -> response?
+ def try_close: (http_uri uri) -> void
+
private
- def get_circuit_for_uri: (generic_uri uri) -> Circuit
+ def get_circuit_for_uri: (uri uri) -> Circuit
def initialize: (Options & _CircuitOptions options) -> void
end
class Circuit
@@ -21,9 +23,11 @@
@max_attempts: Integer
@reset_attempts_in: Float
@break_in: Float
@circuit_breaker_half_open_drip_rate: Float
@attempts: Integer
+ @real_attempts: Integer
+ @drip_factor: Integer
@response: response?
@opened_at: Float?
@attempted_at: Float?
\ No newline at end of file