bbgo_origin/pkg/exchange/okex/stream_callbacks.go
2021-05-27 01:07:38 +08:00

20 lines
326 B
Go

// Code generated by "callbackgen -type Stream -interface"; DO NOT EDIT.
package okex
import ()
func (s *Stream) OnKline(cb func()) {
s.klineCallbacks = append(s.klineCallbacks, cb)
}
func (s *Stream) EmitKline() {
for _, cb := range s.klineCallbacks {
cb()
}
}
type StreamEventHub interface {
OnKline(cb func())
}