2017 © Pedro Peláez
 

library bureaucrat

Failure is my thing

image

aguimaraes/bureaucrat

Failure is my thing

  • Sunday, December 10, 2017
  • by aguimaraes
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

bureaucrat

Latest Version on Packagist ![Software License][ico-license] Build Status StyleCI ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Failure handling for PHP. I would add "elegant" here, but I don't lie., (*2)

Don't use it, work in progress., (*3)

Install

Via Composer, (*4)

``` bash $ composer require aguimaraes/bureaucrat, (*5)


## Usage ``` php $retry = (new Retry()) ->onlyOnException(\RuntimeException::class) ->atLeast(3) ->withDelay(2, TimeUnit::SECOND) ->abortOnException(\DomainException::class); $circuitBreaker = (new CircuitBreaker()) ->withFailureThreshold(3, 5) ->withSuccessThreshold(4, 5) ->withDelay(20, TimeUnit::SECOND) ->failOnException(\RuntimeException::class) ->failOnTimeOut(1, TimeUnit::MINUTE); $result = (new Failsafe()) ->with($retry) ->and($circuitBreaker) ->run(function() { // ... your thing });

Change log

Please see CHANGELOG for more information on what has changed recently., (*6)

Testing

bash $ composer test, (*7)

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details., (*8)

Security

If you discover any security related issues, please email alvaroguimaraes@gmail.com instead of using the issue tracker., (*9)

Credits

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions

10/12 2017

dev-master

9999999-dev https://github.com/aguimaraes/bureaucrat

Failure is my thing

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

retry failure circuit breaker circuitbreaker aguimaraes bureaucrat failsafe fail handler failure handler