com.softinio.verdict4s.Jitter
See theJitter companion object
Where a retry delay's randomness comes from.
A two-method trait rather than a direct call to a random source, for two reasons. Tests get a fully deterministic schedule from Jitter.constant without a mocking library. And the obvious alternatives are both worse here: cats.effect.std.Random is only transitively on the classpath, and deriving randomness from Temporal.monotonic yields a constant on Scala.js, where the clock is millisecond-granular.
This lives in the client, not in algebra, because drawing a sample is an effect and the core must stay effect-free.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
In this article