mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 02:53:50 +00:00
18 lines
346 B
Go
18 lines
346 B
Go
// Code generated by "callbackgen -type KLineStream"; DO NOT EDIT.
|
|
|
|
package indicator
|
|
|
|
import (
|
|
"github.com/c9s/bbgo/pkg/types"
|
|
)
|
|
|
|
func (K *KLineStream) OnUpdate(cb func(k types.KLine)) {
|
|
K.updateCallbacks = append(K.updateCallbacks, cb)
|
|
}
|
|
|
|
func (K *KLineStream) EmitUpdate(k types.KLine) {
|
|
for _, cb := range K.updateCallbacks {
|
|
cb(k)
|
|
}
|
|
}
|