liamsorsby / php-hystrix
PHP implemention of Hystrix
v0.1
2020-01-30 20:00 UTC
Requires
- cache/apcu-adapter: ^1.0
- cache/memcached-adapter: ^1.1@dev
- cache/redis-adapter: master
Requires (Dev)
- ext-apcu: ^4.2.0
- ext-memcached: >=3.0.0
- ext-redis: >=4.2.0
- phploc/phploc: ^4.0
- phpspec/phpspec: ^6.0
- phpstan/phpstan: ^0.12.8
- phpunit/phpunit: ^8.0
- sebastian/phpcpd: ^4.1
- sensiolabs/security-checker: ^5.0
- squizlabs/php_codesniffer: ^3.4
Suggests
- ext-apcu: ^4.2.0
- ext-memcached: >=3.0.0
- ext-redis: >=4.2.0
This package is auto-updated.
Last update: 2025-01-29 06:13:55 UTC
README
Circuit Breaker
This is an example repo that provides basic circuit breaking capabilities
Supported Caches
- APC
- Redis
- RedisArray
- RedisCluster
- Memcached
Examples
$cb = $factory->create(StorageFactory::APC, []); try { if(!$cb->isOpen()) { // do something return; } // Transactional or complex operation } catch (Exception $e) { $cb->reportFailure(''); // log error from $e->getMessage() }
More examples can be found in the examples directory