Skip to contents

Open means too many consecutive transport failures and still inside the cooldown. While open, perform() short-circuits to a skipped envelope instead of waiting on a request that is likely to fail anyway.

Usage

breaker_open(host, now = as.numeric(Sys.time()))

Arguments

host

A hostname, as returned by parsing a request URL.

now

The current time in seconds since the epoch. Exposed so a test can drive the clock rather than sleep.

Value

A single logical.

Examples

breaker_reset()
breaker_open("gnomad.broadinstitute.org")
#> [1] FALSE