Skip to content

An implementation of the Circuit Breaker pattern for Guzzle

License

Notifications You must be signed in to change notification settings

dronezzzko/guzzle-simple-circuit-breaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guzzle Simple Circuit Breaker Middleware

Implementation of the Circuit Breaker pattern for Guzzle that prevents sending failed requests in a row.

How To Install

composer require dronezzzko/guzzle-simple-circuit-breaker

How To Use

use GuzzleHttp\HandlerStack;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\Client;

use Dronezzzko\SimpleCircuitBreakerMiddleware;

$stack = HandlerStack::create();
$stack->push(SimpleCircuitBreakerMiddleware::factory($cache));
$client = new Client(['handler' => $stack]);

About

An implementation of the Circuit Breaker pattern for Guzzle

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages