Policy

object Policy
Companion:
class
class Object
trait Matchable
class Any
Policy.type

Type members

Classlikes

case object BulkheadRejection extends PolicyError[Nothing]
case object CallTimedOut extends PolicyError[Nothing]
case object CircuitBreakerOpen extends PolicyError[Nothing]
sealed trait PolicyError[+E]
case class PolicyException[E](error: PolicyError[E]) extends Exception
case class WrappedError[E](e: E) extends PolicyError[E]

Value members

Concrete methods

def common[E](rateLimiter: RateLimiter, bulkhead: Bulkhead, circuitBreaker: CircuitBreaker[E], retry: Retry[E]): Policy[E]

Creates a common rezilience policy that wraps calls with a bulkhead, followed by a circuit breaker, followed by a rate limiter, followed by a retry policy.

Creates a common rezilience policy that wraps calls with a bulkhead, followed by a circuit breaker, followed by a rate limiter, followed by a retry policy.

i.e. retry(withRateLimiter(withCircuitBreaker(withBulkhead(effect)))

Each of these wraps are optional by the default values for these three policies being noop versions

def noopRetry[E]: Retry[E]
def unwrap[E]: PartialFunction[PolicyError[E], E]

Concrete fields

val noop: Policy[Any]

A policy that does not change the execution of the effect

A policy that does not change the execution of the effect