Slide 33
Slide 33 text
func (st *stateOpen) onEntry(cb *CircuitBreaker) {
// ...
cb.clock.AfterFunc(timeout,
cb.setStateWithLock(&stateHalfOpen{}))
}
func (st *stateOpen) onSuccess(cb *CircuitBreaker) {}
func (st *stateOpen) onFail(cb *CircuitBreaker) {}
33
https://docs.microsoft.com/ja-jp/azure/architecture/patterns/circuit-b
reaker
Open
state.go (抜粋)