sig/plugins/circuit_breaker.rbs in httpx-0.23.4 vs sig/plugins/circuit_breaker.rbs in httpx-0.24.0

- old
+ new

@@ -3,11 +3,11 @@ module CircuitBreaker class CircuitStore @circuits: Hash[String, Circuit] - def try_open: (generic_uri uri, response response) -> void + def try_open: (generic_uri uri, response response) -> response? def try_respond: (Request request) -> response? private @@ -28,11 +28,11 @@ @opened_at: Float? @attempted_at: Float? def respond: () -> response? - def try_open: (response) -> void + def try_open: (response) -> response? def try_close: () -> void private @@ -50,9 +50,13 @@ def self.load_dependencies: (singleton(Session)) -> void def self.extra_options: (Options) -> (Options & _CircuitOptions) module InstanceMethods @circuit_store: CircuitStore + + private + + def try_circuit_open: (Request request, response response) -> response? end end type sessionCircuitBreaker = Session & CircuitBreaker::InstanceMethods \ No newline at end of file