Closed xenoterracide closed 4 years ago
Thanks for the issue!
Corrected the exponential signature and added a half-open event. Opossum has other events as well, but some of them are not related to the state of the circuit breaker and easy to observe yourself (e.g. successes and errors can be seen easily by looking at whether or not the function throws). So I'm not sure I feel the need to add more API for those, but I'm open to pushback..
Actually, https://github.com/connor4312/cockatiel/issues/20 suggests good usages for these. I suppose I'll add them 😛
in your docs you have this
but the signature of
.exponential()
iswhich means it's not optional, but you can provide an empty object it seems.
Thanks for making this, it seems to do exactly what I wanted, the other things I found (opossum) were making the execute harder.
side notes: opossum does have one thing, it has quite a few events that you can hook on, like halfopen, would be cool to have a larger number of events to trigger on. Also from your docs (it might be in Polly) it's unclear why I would want to chain circuitbreaker with retry, since both retry.