2020-10-05 06:16:55 +00:00
|
|
|
// Code generated by "callbackgen -type DepthFrame"; DO NOT EDIT.
|
|
|
|
|
|
|
|
package binance
|
|
|
|
|
2020-11-07 04:38:57 +00:00
|
|
|
import ()
|
|
|
|
|
2020-10-05 06:16:55 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|