2017 © Pedro Peláez
 

library circuit-breaker

Implementation of the circuit breaker pattern

image

aguimaraes/circuit-breaker

Implementation of the circuit breaker pattern

  • Thursday, June 22, 2017
  • by aguimaraes
  • Repository
  • 3 Watchers
  • 8 Stars
  • 11,477 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 9 Versions
  • 8 % Grown

The README.md

circuit-breaker

CircleCI codecov, (*1)

Usage example

$cb = new Aguimaraes\CircuitBreaker(
    new Aguimaraes\Adapter\ACPu()
);

// number of errors necessary to open the circuit
$cb->setThreshold('my-service', 10); 

// wait x seconds to check if service is back
$cb->setTimeout('my-service', 60);

$response = null;

if ($cb->isAvailable('my-service')) {
    try {

        $response = $service->makeCall();
        $cb->reportSuccess('my-service');

    } catch (ServiceException $e) {

        $cb->reportFailure('my-service');

    } catch (NonServiceRelatedException $e) {

        // something went wrong and it was not the service fault

    }
}

The Versions

22/06 2017

dev-feature/apcu-tests

dev-feature/apcu-tests

Implementation of the circuit breaker pattern

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

19/05 2017

dev-master

9999999-dev

Implementation of the circuit breaker pattern

  Sources   Download

MIT Apache-2.0

The Requires

 

The Development Requires

19/05 2017

v0.0.6

0.0.6.0

Implementation of the circuit breaker pattern

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

16/05 2017

v0.0.5

0.0.5.0

Implementation of the circuit breaker pattern

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6

 

The Development Requires

15/05 2017

v0.0.4

0.0.4.0

Implementation of the circuit breaker pattern

  Sources   Download

Apache-2.0

The Requires

  • php >=7.1

 

The Development Requires

18/04 2017

v0.0.3

0.0.3.0

Implementation of the circuit breaker pattern

  Sources   Download

Apache-2.0

The Requires

  • php >=7.1

 

The Development Requires

15/04 2017

v0.0.2

0.0.2.0

Implementation of the circuit breaker pattern

  Sources   Download

MIT

The Requires

  • php ^5.6

 

The Development Requires

24/03 2017

v0.0.1

0.0.1.0

Implementation of the circuit breaker pattern

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

11/03 2017

dev-feature/new-adapter

dev-feature/new-adapter

Implementation of the circuit breaker pattern

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires