connor4312 / cockatiel

🐦 A resilience and transient-fault-handling library that allows developers to express policies such as Backoff, Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback. Inspired by .NET Polly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

please consider changing CircuitState to contain strings instead of numbers

xenoterracide opened this issue · comments

this is unreadable without looking at the code

    this.breakerPolicy.onStateChange(data => this.log.trace('breaker', data))

So I'll have to map it myself, but it would be nice if v3 would change this since in theory it can break backwards compatibility.

nevermind , this does what I want

    this.breakerPolicy.onStateChange(data => this.log.trace('breaker', CircuitState[data]))