sony / gobreaker

Circuit Breaker implemented in Go
MIT License
2.89k stars 179 forks source link

Make CircuitBreaker.setState public. #44

Closed Joel-Duff closed 1 year ago

Joel-Duff commented 1 year ago

Makes the CircuitBreaker.setState method public, to allow developers to implement functionality that can change the breaker's state from outside of the breaker.

pontiyaraja commented 1 year ago

@Joel-Duff is this pr violating the breaker rule? Like we can change the state even it is not successful.

keonjeo commented 1 year ago

it's not a good idea to make it public here. the state shoud be controlled by the circuit breaker. it should be internal logic.