diff --git a/resiliency/06_circuit_breaker/circuit_counter.go b/resiliency/06_circuit_breaker/circuit_counter.go index f1fa83c..02e0191 100644 --- a/resiliency/06_circuit_breaker/circuit_counter.go +++ b/resiliency/06_circuit_breaker/circuit_counter.go @@ -25,6 +25,7 @@ const ( StateClosed State = iota //默认的闭合状态,可以正常执行业务 StateHalfOpen StateOpen + StateUnknown ) //OperationState of current 某一次操作的结果状态 diff --git a/resiliency/06_circuit_breaker/circuit_func_closure_basic.go b/resiliency/06_circuit_breaker/circuit_func_closure_basic.go index cb8dcb5..18a8972 100644 --- a/resiliency/06_circuit_breaker/circuit_func_closure_basic.go +++ b/resiliency/06_circuit_breaker/circuit_func_closure_basic.go @@ -14,7 +14,7 @@ import ( ) //////////////////////////////// -//way 2 简单的函数式断路器 +//way 1 简单的函数式断路器 // 一个func实例作为一个Breaker 允许多个worker(即goroutine)同时访问 // 当前简单场景下,只考虑单个worker情况下的连续请求 // 当前的设计思路,非常简单: