# `ExternalService.CircuitBreaker.Fuse`
[🔗](https://github.com/jvoegele/external_service/blob/main/lib/external_service/circuit_breaker/fuse.ex#L1)

The default circuit breaker backend, built on the
[`:fuse`](https://github.com/jlouis/fuse) library.

This is the breaker `ExternalService` has always used, and you get it without
configuring anything. It is **node-local**: each node counts its own failures
and opens its own breaker, which is usually what you want — a node with a bad
network path should stop calling the service without taking the rest of the
cluster down with it.

It is configured through the ordinary `:circuit_breaker` options (`:tolerate`,
`:within`, `:reset`, `:fault_injection`); see `ExternalService.start/2`.

# `strategy`

```elixir
@spec strategy(keyword()) :: tuple()
```

Builds the `:fuse` strategy tuple for the given circuit breaker options.

Exposed so that backends layered on top of this one (such as
`ExternalService.CircuitBreaker.Cluster`) can reuse it.

# `tolerate`

```elixir
@spec tolerate(ExternalService.CircuitBreaker.config()) :: pos_integer() | :infinity
```

Returns the number of failures the breaker tolerates before opening.

Read back out of an installed breaker's config, so that a layered backend can
work out how many melts it takes to trip this node's breaker.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
