bbgo_origin/pkg/exchange/okex/klinestream_callbacks.go
2024-01-30 10:23:10 +08:00

20 lines
433 B
Go

// 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))
}