bbgo_origin/pkg/exchange/okex/klinestream_callbacks.go

20 lines
433 B
Go
Raw Normal View History

2024-01-26 07:21:31 +00:00
// Code generated by "callbackgen -type KLineStream -interface"; DO NOT EDIT.
package okex
import ()
func (K *KLineStream) OnKLineEvent(cb func(candle KLineEvent)) {
K.kLineEventCallbacks = append(K.kLineEventCallbacks, cb)
}
func (K *KLineStream) EmitKLineEvent(candle KLineEvent) {
for _, cb := range K.kLineEventCallbacks {
cb(candle)
}
}
type KLineStreamEventHub interface {
OnKLineEvent(cb func(candle KLineEvent))
}