MCPcopy Create free account

hub / github.com/danielfm/pybreaker / functions

Functions206 in github.com/danielfm/pybreaker

Methodopened_at
Return the most recent value of when the circuit was opened.
src/pybreaker/__init__.py:464
Methodopened_at
Returns a datetime object of the most recent value of when the circuit was opened.
src/pybreaker/__init__.py:598
Methodreset_counter
Override this method to set the failure counter to zero.
src/pybreaker/__init__.py:387
Methodreset_counter
Set the failure counter to zero.
src/pybreaker/__init__.py:441
Methodreset_success_counter
Override this method to set the success counter to zero.
src/pybreaker/__init__.py:393
Methodreset_success_counter
Set the success counter to zero.
src/pybreaker/__init__.py:449
Methodreset_timeout
Once this circuit breaker is opened, it should remain opened until the timeout period, in seconds, elapses.
src/pybreaker/__init__.py:138
MethodsetUp
(self)
tests/pybreaker_test.py:908
MethodsetUp
(self)
tests/pybreaker_test.py:960
MethodsetUp
(self)
tests/pybreaker_test.py:1044
MethodsetUp
(self)
tests/pybreaker_test.py:1177
Methodset_if_greater
(pipe: Pipeline[bytes])
src/pybreaker/__init__.py:627
Methodstate
Update (if needed) and returns the cached state object.
src/pybreaker/__init__.py:179
Methodstate
Override this method to retrieve the current circuit breaker state.
src/pybreaker/__init__.py:377
Methodstate
Return the current circuit breaker state.
src/pybreaker/__init__.py:428
Methodstate
Return the current circuit breaker state. If the circuit breaker state on Redis is missing, re-initialize it with the fallback circui
src/pybreaker/__init__.py:515
Methodstate_change
(self, cb, old_state, new_state)
tests/pybreaker_test.py:276
Methodstate_change
(self, cb, old_state, new_state)
tests/pybreaker_test.py:1137
Methodstate_change
(self, cb, old_state, new_state)
tests/pybreaker_test.py:1278
Methodsuc
()
tests/pybreaker_test.py:50
Methodsuc
Docstring
tests/pybreaker_test.py:676
Methodsuc
()
tests/pybreaker_test.py:1092
Methodsuc
()
tests/pybreaker_test.py:1233
Methodsuccess
(self, cb)
tests/pybreaker_test.py:319
Methodsuccess
(self, cb)
tests/pybreaker_test.py:1100
Methodsuccess
(self, cb)
tests/pybreaker_test.py:1241
Methodsuccess_counter
Return the current number of consecutive successes in half-open state.
src/pybreaker/__init__.py:123
Methodsuccess_counter
Override this method to retrieve the current value of the success counter.
src/pybreaker/__init__.py:403
Methodsuccess_counter
Return the current value of the success counter.
src/pybreaker/__init__.py:459
Methodsuccess_counter
Return the current value of the success counter.
src/pybreaker/__init__.py:586
Methodsuccess_threshold
Return the number of successful requests required before transitioning from half-open to closed state.
src/pybreaker/__init__.py:150
MethodtearDown
(self)
tests/pybreaker_test.py:965
MethodtearDown
(self)
tests/pybreaker_test.py:1186
Methodtest_add_excluded_exception
CircuitBreaker: it should allow the user to exclude an exception at a later time.
tests/pybreaker_test.py:643
Methodtest_add_excluded_exceptions
CircuitBreaker: it should allow the user to exclude exceptions at a later time.
tests/pybreaker_test.py:655
Methodtest_add_listener
CircuitBreaker: it should allow the user to add a listener at a later time.
tests/pybreaker_test.py:511
Methodtest_add_listeners
CircuitBreaker: it should allow the user to add listeners at a later time.
tests/pybreaker_test.py:525
Methodtest_call_async_with_args
CircuitBreaker: it should be able to invoke async functions with args.
tests/pybreaker_test.py:490
Methodtest_call_async_with_kwargs
CircuitBreaker: it should be able to invoke async functions with kwargs.
tests/pybreaker_test.py:501
Methodtest_call_async_with_no_args
CircuitBreaker: it should be able to invoke async functions with no-args.
tests/pybreaker_test.py:479
Methodtest_call_events
CircuitBreaker: it should call the appropriate functions on every successful/failed call.
tests/pybreaker_test.py:299
Methodtest_call_with_args
CircuitBreaker: it should be able to invoke functions with args.
tests/pybreaker_test.py:462
Methodtest_call_with_kwargs
CircuitBreaker: it should be able to invoke functions with kwargs.
tests/pybreaker_test.py:470
Methodtest_call_with_no_args
CircuitBreaker: it should be able to invoke functions with no-args.
tests/pybreaker_test.py:454
Methodtest_calling
Test that the CircuitBreaker calling() API returns a context manager and works as expected.
tests/pybreaker_test.py:1321
Methodtest_close
CircuitBreaker: it should allow the circuit to be closed manually.
tests/pybreaker_test.py:242
Methodtest_cluster_mode
(self)
tests/pybreaker_test.py:1020
Methodtest_contextmanager
CircuitBreaker: it should catch in a with statement
tests/pybreaker_test.py:362
Methodtest_create_new_state__bad_state
(self)
tests/pybreaker_test.py:913
Methodtest_decorator
CircuitBreaker: it should be a decorator.
tests/pybreaker_test.py:672
Methodtest_decorator_call_future
CircuitBreaker: it should be a decorator.
tests/pybreaker_test.py:698
Methodtest_default_params
CircuitBreaker: it should define smart defaults.
tests/pybreaker_test.py:394
Methodtest_default_state
CircuitBreaker: it should get initial state from state_storage.
tests/pybreaker_test.py:387
Methodtest_excluded_callable_and_types_exceptions
CircuitBreaker: it should allow a mix of exclusions that includes both filter functions and types.
tests/pybreaker_test.py:605
Methodtest_excluded_callable_exceptions
CircuitBreaker: it should ignore specific exceptions that return true from a filtering callable.
tests/pybreaker_test.py:574
Methodtest_excluded_exceptions
CircuitBreaker: it should ignore specific exceptions.
tests/pybreaker_test.py:542
Methodtest_fail_max_setter
CircuitBreaker: it should allow the user to set a new value for 'fail_max'.
tests/pybreaker_test.py:438
Methodtest_fail_max_thread_safety
CircuitBreaker: it should not allow more failed calls than 'fail_max' setting.
tests/pybreaker_test.py:1147
Methodtest_fail_max_thread_safety
CircuitBreaker: it should not allow more failed calls than 'fail_max' setting. Note that with Redis, where we have separate systems in
tests/pybreaker_test.py:1288
Methodtest_fail_thread_safety
CircuitBreaker: it should compute a failed call atomically to avoid race conditions.
tests/pybreaker_test.py:1057
Methodtest_fail_thread_safety
CircuitBreaker: it should compute a failed call atomically to avoid race conditions.
tests/pybreaker_test.py:1199
Methodtest_failed_call_after_timeout
CircuitBreaker: it should half-open the circuit after timeout.
tests/pybreaker_test.py:147
Methodtest_failed_call_when_halfopen
CircuitBreaker: it should open the circuit when a call fails in half-open state.
tests/pybreaker_test.py:207
Methodtest_failure_count_not_reset_during_creation
(self)
tests/pybreaker_test.py:931
Methodtest_fallback_state
(self)
tests/pybreaker_test.py:984
Methodtest_generator
CircuitBreaker: it should inspect generator values.
tests/pybreaker_test.py:336
Methodtest_half_open_thread_safety
CircuitBreaker: it should allow only one trial call when the circuit is half-open.
tests/pybreaker_test.py:1111
Methodtest_half_open_thread_safety
CircuitBreaker: it should allow only one trial call when the circuit is half-open.
tests/pybreaker_test.py:1252
Methodtest_missing_state
CircuitBreakerRedis: If state on Redis is missing, it should set the fallback circuit state and reset the fail counter to 0.
tests/pybreaker_test.py:999
Methodtest_name
CircuitBreaker: it should allow an optional name to be set and retrieved.
tests/pybreaker_test.py:736
Methodtest_namespace
(self)
tests/pybreaker_test.py:968
Methodtest_new_with_custom_excluded_exceptions
CircuitBreaker: it should support a custom list of excluded exceptions.
tests/pybreaker_test.py:426
Methodtest_new_with_custom_fail_max
CircuitBreaker: it should support a custom maximum number of failures.
tests/pybreaker_test.py:414
Methodtest_new_with_custom_reset_timeout
CircuitBreaker: it should support a custom reset timeout value.
tests/pybreaker_test.py:404
Methodtest_no_tornado_raises
(self)
tests/pybreaker_test.py:728
Methodtest_notify_called_on_state_change
(self, open_state)
tests/pybreaker_test.py:924
Methodtest_notify_not_called_on_init
(self, open_state)
tests/pybreaker_test.py:918
Methodtest_one_failed_call
CircuitBreaker: it should keep the circuit closed after a few failures.
tests/pybreaker_test.py:32
Methodtest_one_successful_call_after_failed_call
CircuitBreaker: it should keep the circuit closed after few mixed outcomes.
tests/pybreaker_test.py:45
Methodtest_remove_excluded_exception
CircuitBreaker: it should allow the user to remove an excluded exception.
tests/pybreaker_test.py:662
Methodtest_remove_listener
CircuitBreaker: it should allow the user to remove a listener.
tests/pybreaker_test.py:533
Methodtest_reset_timeout_setter
CircuitBreaker: it should allow the user to set a new value for 'reset_timeout'.
tests/pybreaker_test.py:446
Methodtest_several_failed_calls_setting_absent
CircuitBreaker: it should open the circuit after many failures.
tests/pybreaker_test.py:64
Methodtest_state_opened_at_not_reset_during_creation
(self)
tests/pybreaker_test.py:940
Methodtest_success_thread_safety
CircuitBreaker: it should compute a successful call atomically to avoid race conditions.
tests/pybreaker_test.py:1086
Methodtest_success_thread_safety
CircuitBreaker: it should compute a successful call atomically to avoid race conditions.
tests/pybreaker_test.py:1227
Methodtest_success_threshold_default_behavior
CircuitBreaker: it should maintain backward compatibility with default success_threshold=1.
tests/pybreaker_test.py:748
Methodtest_success_threshold_failure_resets_counter
CircuitBreaker: it should reset success counter when a failure occurs in half-open state.
tests/pybreaker_test.py:812
Methodtest_success_threshold_multiple_successes_required
CircuitBreaker: it should require multiple successful calls before closing when success_threshold > 1.
tests/pybreaker_test.py:775
Methodtest_success_threshold_property
CircuitBreaker: it should support getting and setting success_threshold.
tests/pybreaker_test.py:850
Methodtest_success_threshold_redis_storage
CircuitBreaker: it should work correctly with Redis storage.
tests/pybreaker_test.py:858
Methodtest_successful_after_timeout
CircuitBreaker: it should close the circuit when a call succeeds after timeout. The successful function should only be called once.
tests/pybreaker_test.py:174
Methodtest_successful_call
CircuitBreaker: it should keep the circuit closed after a successful call.
tests/pybreaker_test.py:20
Methodtest_successful_call_when_halfopen
CircuitBreaker: it should close the circuit when a call succeeds in half-open state.
tests/pybreaker_test.py:225
Methodtest_throw_new_error_on_trip_false
CircuitBreaker: it should throw the original exception
tests/pybreaker_test.py:82
Methodtest_throw_new_error_on_trip_true
CircuitBreaker: it should throw a CircuitBreakerError exception
tests/pybreaker_test.py:106
Methodtest_traceback_in_circuitbreaker_error
CircuitBreaker: it should open the circuit after many failures.
tests/pybreaker_test.py:124
Methodtest_transition_events
CircuitBreaker: it should call the appropriate functions on every state transition.
tests/pybreaker_test.py:267
Methodtrigger_error
()
tests/pybreaker_test.py:1070
Methodtrigger_error
()
tests/pybreaker_test.py:1212
← previousnext →101–200 of 206, ranked by callers