Download the PHP package bvtterfly/laravel-circuit-breaker without Composer
On this page you can find all versions of the php package bvtterfly/laravel-circuit-breaker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bvtterfly/laravel-circuit-breaker
More information about bvtterfly/laravel-circuit-breaker
Files in bvtterfly/laravel-circuit-breaker
Package laravel-circuit-breaker
Short Description Laravel circuit breaker package
License MIT
Homepage https://github.com/bvtterfly/laravel-circuit-breaker
Informations about the package laravel-circuit-breaker
🚨 THIS PACKAGE HAS BEEN ABANDONED 🚨
I no longer use Laravel and cannot justify the time needed to maintain this package. That's why I have chosen to abandon it. Feel free to fork my code and maintain your own copy.
Laravel Circuit Breaker
This package is a simple implementation of circuit breaker pattern for laravel. It protects your application from failures of its service dependencies.
Resources about the circuit breaker pattern:
- http://martinfowler.com/bliki/CircuitBreaker.html
- https://github.com/Netflix/Hystrix/wiki/How-it-Works#CircuitBreaker
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
Your application may have multiple services, so you will have to get a circuit breaker for each service:
Three states of circuit breaker
You can then determine whether a service is available or not.
Service is available if it's CLOSED or HALF_OPEN. Then, you should call your service, depending on the response. You can mark it as a success or failure to update the circuit status.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- ARI
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-circuit-breaker with dependencies
spatie/laravel-package-tools Version ^1.9.2
illuminate/contracts Version ^9.0