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