Download the PHP
package leocarmo/circuit-breaker-php without Composer
On this page you can find all versions of the php package
leocarmo/circuit-breaker-php. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor leocarmo Package circuit-breaker-php Short Description Circuit Breaker for PHP License
MIT
FAQ
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
The first argument is a redis connection, the second is your product name, for redis namespace avoid key conflicts with another product using the same redis.
See this for full example
Redis Cluster Adapter
Without use of multi command.
The first argument is a redis connection, the second is your product name, for redis namespace avoid key conflicts with another product using the same redis.
See this for full example
SwooleTable Adapter
Guzzle Middleware
Important: all status code between 200 and 299 will be recorded as a success, and other status will be recorded as a failure.
See this for full example
Customize success status code
If you need to specify a custom status code that is not a failure, you can use:
Important: this configuration will record a success when a status code 400 is returned
See this for full example
Ignore status code
If you want to ignore the status code returned and not record a success or failure, use this:
[!IMPORTANT]
To use Customize success status code or Ignore status code you must set the Guzzle client config http_errors = false because the Guzzle Client throws a ClientException or ServerException when the status code is not in range >200 && <300.
Set circuit break settings
This is not required, default values will be set
Check if circuit is available (closed)
Each check is for a specific service. So you can have multiple services in the same application, and when one circuit is open, the other works normally.
Record success and failure
Development
Setup
Tests
Contributors
All versions of circuit-breaker-php with dependencies
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package leocarmo/circuit-breaker-php contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.