Track failures to open the circuit.
this.failures++
>= this.threshold
class Breaker { failures = 0; constructor(threshold) { this.threshold = threshold; } // TODO }