depth

package
v1.64.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 6 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(fetcher SnapshotFetcher, bufferingPeriod time.Duration) *Buffer

func (*Buffer) AddUpdate

func (b *Buffer) AddUpdate(o types.SliceOrderBook, firstUpdateID int64, finalArgs ...int64) error

AddUpdate adds the update to the buffer or push the update to the subscriber

func (*Buffer) CheckPreviousID added in v1.63.0

func (b *Buffer) CheckPreviousID()

func (*Buffer) EmitPush

func (b *Buffer) EmitPush(update Update)

func (*Buffer) EmitReady

func (b *Buffer) EmitReady(snapshot types.SliceOrderBook, updates []Update)

func (*Buffer) EmitReset

func (b *Buffer) EmitReset()

func (*Buffer) OnPush

func (b *Buffer) OnPush(cb func(update Update))

func (*Buffer) OnReady

func (b *Buffer) OnReady(cb func(snapshot types.SliceOrderBook, updates []Update))

func (*Buffer) OnReset

func (b *Buffer) OnReset(cb func())

func (*Buffer) Reset

func (b *Buffer) Reset()

func (*Buffer) SetLogger added in v1.61.0

func (b *Buffer) SetLogger(logger *logrus.Entry)

func (*Buffer) SetSnapshot added in v1.61.0

func (b *Buffer) SetSnapshot(snapshot types.SliceOrderBook, firstUpdateID int64, finalArgs ...int64) error

func (*Buffer) SetUpdateTimeout added in v1.25.4

func (b *Buffer) SetUpdateTimeout(d time.Duration)

type SnapshotFetcher

type SnapshotFetcher func() (snapshot types.SliceOrderBook, finalUpdateID int64, err error)

type Update

type Update struct {
	FirstUpdateID, FinalUpdateID, PreviousUpdateID int64

	// Object is the update object
	Object types.SliceOrderBook
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL