add a StateUnknown

This commit is contained in:
Edward 2020-06-02 23:55:42 +08:00
parent a5d498c39c
commit 85d2ac3d20
2 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,7 @@ const (
StateClosed State = iota //默认的闭合状态,可以正常执行业务
StateHalfOpen
StateOpen
StateUnknown
)
//OperationState of current 某一次操作的结果状态

View File

@ -14,7 +14,7 @@ import (
)
////////////////////////////////
//way 2 简单的函数式断路器
//way 1 简单的函数式断路器
// 一个func实例作为一个Breaker 允许多个worker(即goroutine)同时访问
// 当前简单场景下只考虑单个worker情况下的连续请求
// 当前的设计思路,非常简单: