tesla v0.10.0 Tesla.Middleware.Fuse View Source
Circuit Breaker middleware using fuse
Remember to add {:fuse, "~> 2.4"}
to dependencies (and :fuse
to applications in mix.exs
)
Also, you need to recompile tesla after adding :fuse
dependency:
mix deps.clean tesla
mix deps.compile tesla
Example usage
defmodule MyClient do
use Tesla
plug Tesla.Middleware.Fuse, opts: {{:standard, 2, 10_000}, {:reset, 60_000}}
end
Options
:name
- fuse name (defaults to module name):opts
- fuse options (see fuse docs for reference)
Link to this section Summary
Functions
Callback implementation for Tesla.Middleware.call/3
Link to this section Functions
Callback implementation for Tesla.Middleware.call/3
.