2023-10-18 03:25:50 +00:00
|
|
|
// Code generated by "callbackgen -type Stream"; DO NOT EDIT.
|
|
|
|
|
|
|
|
package bitget
|
|
|
|
|
|
|
|
import ()
|
|
|
|
|
|
|
|
func (s *Stream) OnBookEvent(cb func(o BookEvent)) {
|
|
|
|
s.bookEventCallbacks = append(s.bookEventCallbacks, cb)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Stream) EmitBookEvent(o BookEvent) {
|
|
|
|
for _, cb := range s.bookEventCallbacks {
|
|
|
|
cb(o)
|
|
|
|
}
|
|
|
|
}
|
2023-10-19 10:12:05 +00:00
|
|
|
|
|
|
|
func (s *Stream) OnMarketTradeEvent(cb func(o MarketTradeEvent)) {
|
|
|
|
s.marketTradeEventCallbacks = append(s.marketTradeEventCallbacks, cb)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Stream) EmitMarketTradeEvent(o MarketTradeEvent) {
|
|
|
|
for _, cb := range s.marketTradeEventCallbacks {
|
|
|
|
cb(o)
|
|
|
|
}
|
|
|
|
}
|