2017 © Pedro Peláez
 

library laravel-circuit-breaker

Circuit Breaker pattern implementation in Laravel 5.

image

rymanalu/laravel-circuit-breaker

Circuit Breaker pattern implementation in Laravel 5.

  • Thursday, December 8, 2016
  • by rymanalu
  • Repository
  • 3 Watchers
  • 3 Stars
  • 276 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Laravel 5 Circuit Breaker

Build Status, (*1)

This package provides an implementation of Circuit Breaker pattern for Laravel 5., (*2)

Installation

First, install this package:, (*3)

composer require rymanalu/laravel-circuit-breaker

Next, add the ServiceProvider to the providers array in config/app.php:, (*4)

Rymanalu\LaravelCircuitBreaker\CircuitBreakerServiceProvider::class,

You can use the facade for shorter code. Add this to your aliases:, (*5)

'CircuitBreaker' => Rymanalu\LaravelCircuitBreaker\CircuitBreakerFacade::class,

APIs

<?php

use CircuitBreaker;

/**
 * Get the number of failures for the given key.
 *
 * @param  string  $key
 * @return int
 */
CircuitBreaker::failures($key);

/**
 * Reset the number of failures for the given key.
 *
 * @param  string  $key
 * @return bool
 */
CircuitBreaker::resetFailures($key);

/**
 * Increment the counter for a given key for a given decay time.
 *
 * @param  string  $key
 * @param  float|int  $decayMinutes
 * @return int
 */
CircuitBreaker::track($key, $decayMinutes = 1);

/**
 * Determine if the given key has too many failures.
 *
 * @param  string  $key
 * @param  int  $maxFailures
 * @param  int  $decayMinutes
 * @return bool
 */
CircuitBreaker::tooManyFailures($key, $maxFailures, $decayMinutes = 1);

The Versions

08/12 2016

dev-master

9999999-dev https://github.com/rymanalu/laravel-circuit-breaker

Circuit Breaker pattern implementation in Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roni Yusuf Manalu

laravel circuit breaker

08/12 2016

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/rymanalu/laravel-circuit-breaker

Circuit Breaker pattern implementation in Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roni Yusuf Manalu

laravel circuit breaker

08/12 2016

v1.0.1

1.0.1.0 https://github.com/rymanalu/laravel-circuit-breaker

Circuit Breaker pattern implementation in Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roni Yusuf Manalu

laravel circuit breaker

08/12 2016

v1.0.0

1.0.0.0 https://github.com/rymanalu/laravel-circuit-breaker

Circuit Breaker pattern implementation in Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roni Yusuf Manalu

laravel circuit breaker