The CircuitBreaker
is used to provide stability and prevent cascading failures in distributed systems.
To use circuit in an existing SBT project with Scala 2.11 or a later version, add the following dependencies to your
build.sbt
depending on your needs:
libraryDependencies ++= Seq(
"io.chrisdavenport" %% "circuit" % "<version>"
)
This data type was inspired by the availability of Akka's Circuit Breaker and ported to cats-effect from Monix and when its merger halted there, it was moved to circuit. The initial implementation and port by Alexandru Nedelcu and Oleg Pyzhcov was what enabled this ref based version to exist.