mirror of
https://github.com/crazybber/go-pattern-examples.git
synced 2024-11-25 05:06:03 +03:00
add a StateUnknown
This commit is contained in:
parent
a5d498c39c
commit
85d2ac3d20
@ -25,6 +25,7 @@ const (
|
||||
StateClosed State = iota //默认的闭合状态,可以正常执行业务
|
||||
StateHalfOpen
|
||||
StateOpen
|
||||
StateUnknown
|
||||
)
|
||||
|
||||
//OperationState of current 某一次操作的结果状态
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
////////////////////////////////
|
||||
//way 2 简单的函数式断路器
|
||||
//way 1 简单的函数式断路器
|
||||
// 一个func实例作为一个Breaker 允许多个worker(即goroutine)同时访问
|
||||
// 当前简单场景下,只考虑单个worker情况下的连续请求
|
||||
// 当前的设计思路,非常简单:
|
||||
|
Loading…
Reference in New Issue
Block a user