bbgo_origin/pkg/bbgo/marketdatastore_callbacks.go

18 lines
375 B
Go
Raw Normal View History

// Code generated by "callbackgen -type MarketDataStore"; DO NOT EDIT.
package bbgo
import (
2020-10-11 08:46:15 +00:00
"github.com/c9s/bbgo/pkg/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)
}
}