bbgo_origin/pkg/indicator/float64updater_callbacks.go

16 lines
313 B
Go
Raw Permalink Normal View History

// Code generated by "callbackgen -type Float64Updater"; DO NOT EDIT.
package indicator
import ()
2023-05-30 03:35:24 +00:00
func (f *Float64Updater) OnUpdate(cb func(v float64)) {
f.updateCallbacks = append(f.updateCallbacks, cb)
}
2023-05-30 03:35:24 +00:00
func (f *Float64Updater) EmitUpdate(v float64) {
for _, cb := range f.updateCallbacks {
cb(v)
}
}