Cats Retry 101
summary
Cats Retry is a micro‑library that encodes concrete retry policies as types and composes them with join/meets composition, providing built‑in policies like constant, Fibonacci and exponential backoff and a sleep typeclass so tests can fast‑forward time. It exposes pure and effectful retrying functions with an onFailure hook, passes policies implicitly, and targets Cats Effect IO (Monix and ZIO work are in progress). Example given: wrap an IO HTTP request, set maxRetries = 2, and observe retries and delays happening as specified.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:01What's retrying?
- 1:51Cats retry policies
- 2:47Policy combinator: Join
- 5:36Sleep typeclass
- 10:31Syntactic sugar
- 12:08Composing
- 14:34Service mesh
related talks
44mTelling the Truth with Types
57mKittens: Shapeless Typeclass Derivation for Cats
27mEffect: Production-Grade TypeScript
32mRailway Oriented TypeScript
58mExceptional Haskell
24mThrow Try/Catch in the 🗑️ Level up your React error handling with the Result type
24mTYPESAFE TECHNIQUES FOR BETTER SLEEP AT NIGHT
31mPromises and Generators: control flow utopia
