object RefreshableEffect
- Companion
- class
class Object
trait Matchable
class Any
Value members
Concrete methods
def createRetryResource[F[_], A](refresh: F[A], refreshInterval: FiniteDuration, onRefreshSuccess: F[Unit], onRefreshError: PartialFunction[Throwable, F[Unit]], retryDelay: FiniteDuration, retryNextDelay: FiniteDuration => FiniteDuration, retryMaxAttempts: Int, onRetriesExhausted: PartialFunction[Throwable, F[Unit]])(implicit evidence$1: Temporal[F]): Resource[F, RefreshableEffect[F, A]]
Create a refreshable effect which exposes the result of refresh
, retries
if refreshing the value fails.
Create a refreshable effect which exposes the result of refresh
, retries
if refreshing the value fails.
- Value Params
- onRefreshError
what to do if refreshing the value fails, error is always rethrown
- onRefreshSuccess
what to do when the value is successfully refresh, errors are ignored
- onRetriesExhausted
what to do if retrying to refresh the value fails, up to user handle failing their service
- refreshInterval
how frequently to refresh the value
- retryDelay
duration of delay before the first retry
- retryMaxAttempts
how many attempts to make before failing with last error
- retryNextDelay
what value to delay before the next retry