mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-24 07:45:15 +00:00
20 lines
433 B
Go
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))
|
|
}
|