mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-11 01:23:51 +00:00
18 lines
380 B
Go
18 lines
380 B
Go
|
// Code generated by "callbackgen -type MarketDataStore"; DO NOT EDIT.
|
||
|
|
||
|
package bbgo
|
||
|
|
||
|
import (
|
||
|
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||
|
)
|
||
|
|
||
|
func (store *MarketDataStore) OnUpdate(cb KLineCallback) {
|
||
|
store.updateCallbacks = append(store.updateCallbacks, cb)
|
||
|
}
|
||
|
|
||
|
func (store *MarketDataStore) EmitUpdate(kline types.KLine) {
|
||
|
for _, cb := range store.updateCallbacks {
|
||
|
cb(kline)
|
||
|
}
|
||
|
}
|