engine

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 7 Imported by: 1 module, 1 package

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 DBHandler

type DBHandler interface {
	Update(matchResult common.MatchResult) sync.WaitGroup
}

type Engine

type Engine struct {

	// Wait for all queue handler exit gracefully
	Wg sync.WaitGroup
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(ctx context.Context) *Engine

func (*Engine) HandleCancelOrder added in v0.0.6

func (e *Engine) HandleCancelOrder(order *common.MemoryOrder) (msg *common.WebSocketMessage, success bool)

func (*Engine) HandleNewOrder added in v0.0.2

func (e *Engine) HandleNewOrder(order *common.MemoryOrder) (matchResult common.MatchResult, hasMatch bool)

func (*Engine) ReInsertOrder added in v0.0.9

func (e *Engine) ReInsertOrder(order *common.MemoryOrder) (msg *common.WebSocketMessage)

func (*Engine) RegisterDBHandler added in v0.0.2

func (e *Engine) RegisterDBHandler(handler DBHandler)

func (*Engine) RegisterOrderBookActivitiesHandler added in v0.0.2

func (e *Engine) RegisterOrderBookActivitiesHandler(handler OrderBookActivitiesHandler)

func (*Engine) RegisterOrderBookSnapshotHandler added in v0.0.2

func (e *Engine) RegisterOrderBookSnapshotHandler(handler OrderBookSnapshotHandler)

type MarketHandler

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

func NewMarketHandler

func NewMarketHandler(ctx context.Context, market string) (*MarketHandler, error)

type OrderBookActivitiesHandler

type OrderBookActivitiesHandler interface {
	Update(webSocketMessages []common.WebSocketMessage) sync.WaitGroup
}

type OrderBookSnapshotHandler

type OrderBookSnapshotHandler interface {
	Update(key string, snapshot *common.SnapshotV2) sync.WaitGroup
}

Jump to

Keyboard shortcuts

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