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