Lines Matching defs:Breaker
22 type Breaker struct { struct
23 errorThreshold, successThreshold int
24 timeout time.Duration
26 lock sync.Mutex
27 state uint32
28 errors, successes int
29 lastError time.Time
48 func (b *Breaker) Run(work func() error) error {
63 func (b *Breaker) Go(work func() error) error {
78 func (b *Breaker) doWork(state uint32, work func() error) error {
106 func (b *Breaker) processResult(result error, panicValue interface{}) {
139 func (b *Breaker) openBreaker() {
144 func (b *Breaker) closeBreaker() {
148 func (b *Breaker) timer() {
157 func (b *Breaker) changeState(newState uint32) {