mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 19:13:52 +00:00
26 lines
596 B
Go
26 lines
596 B
Go
// Code generated by "callbackgen -type DepthFrame"; DO NOT EDIT.
|
|
|
|
package binance
|
|
|
|
import ()
|
|
|
|
func (f *DepthFrame) OnReady(cb func(snapshotDepth DepthEvent, bufEvents []DepthEvent)) {
|
|
f.readyCallbacks = append(f.readyCallbacks, cb)
|
|
}
|
|
|
|
func (f *DepthFrame) EmitReady(snapshotDepth DepthEvent, bufEvents []DepthEvent) {
|
|
for _, cb := range f.readyCallbacks {
|
|
cb(snapshotDepth, bufEvents)
|
|
}
|
|
}
|
|
|
|
func (f *DepthFrame) OnPush(cb func(e DepthEvent)) {
|
|
f.pushCallbacks = append(f.pushCallbacks, cb)
|
|
}
|
|
|
|
func (f *DepthFrame) EmitPush(e DepthEvent) {
|
|
for _, cb := range f.pushCallbacks {
|
|
cb(e)
|
|
}
|
|
}
|