qbtrade/pkg/exchange/okex/klinestream_callbacks.go

20 lines
433 B
Go
Raw Permalink Normal View History

2024-06-27 14:42:38 +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))
}