mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 00:05:15 +00:00
16 lines
309 B
Go
16 lines
309 B
Go
|
// Code generated by "callbackgen -type BasicCircuitBreaker"; DO NOT EDIT.
|
||
|
|
||
|
package circuitbreaker
|
||
|
|
||
|
import ()
|
||
|
|
||
|
func (b *BasicCircuitBreaker) OnPanic(cb func()) {
|
||
|
b.panicCallbacks = append(b.panicCallbacks, cb)
|
||
|
}
|
||
|
|
||
|
func (b *BasicCircuitBreaker) EmitPanic() {
|
||
|
for _, cb := range b.panicCallbacks {
|
||
|
cb()
|
||
|
}
|
||
|
}
|