Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stfndamjanovic committed Jan 18, 2024
1 parent 25be2e3 commit bc6c0ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ You can configure the circuit breaker to fail based on specific conditions or to
```php
use Stfn\CircuitBreaker\CircuitBreaker;

$breaker = CircuitBreaker::for('test-service')
$breaker = CircuitBreaker::for('3rd-party-service')
->failWhen(function ($result) {
return $result->status() >= 400;
});

$breaker = CircuitBreaker::for('test-service')
$breaker = CircuitBreaker::for('3rd-party-service')
->skipFailure(function ($exception) {
return $exception instanceof HttpException;
});
Expand Down Expand Up @@ -106,7 +106,7 @@ Attach the listener to the circuit breaker:
```php
use Stfn\CircuitBreaker\CircuitBreaker;

$breaker = CircuitBreaker::for('test-service')
$breaker = CircuitBreaker::for('3rd-party-service')
->listeners([new LoggerListener()]);
```

Expand Down

0 comments on commit bc6c0ca

Please sign in to comment.