dex_engine

package
v0.0.0-...-fed0080 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitWsQueue

func InitWsQueue(queue common.IQueue)

func InsertOrder

func InsertOrder(order *models.Order) error

func InsertTrade

func InsertTrade(trade *models.Trade) error

func Run

func Run(ctx context.Context, startMetrics func())

func UpdateOrder

func UpdateOrder(order *models.Order) error

func UpdateTrade

func UpdateTrade(trade *models.Trade) error

Types

type DexEngine

type DexEngine struct {

	// Wait for all queue handler exit gracefully
	Wg sync.WaitGroup

	HydroEngine *engine.Engine
	// contains filtered or unexported fields
}

func NewDexEngine

func NewDexEngine(ctx context.Context) *DexEngine

type MarketHandler

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

func NewMarketHandler

func NewMarketHandler(ctx context.Context, market *models.Market, engine *engine.Engine) (*MarketHandler, error)

func (*MarketHandler) Run

func (m *MarketHandler) Run()

Run is synchronous, it will be improved in the later releases.

func (*MarketHandler) Stop

func (m *MarketHandler) Stop()

type MatchResultWithOrders

type MatchResultWithOrders struct {
	Sequence uint64
	*common.MatchResult
	// contains filtered or unexported fields
}

func NewMatchResultWithOrders

func NewMatchResultWithOrders(takerOrder *models.Order, result *common.MatchResult) *MatchResultWithOrders

type RedisOrderBookActivitiesHandler

type RedisOrderBookActivitiesHandler struct {
}

func (RedisOrderBookActivitiesHandler) Update

func (handler RedisOrderBookActivitiesHandler) Update(webSocketMessages []common.WebSocketMessage) sync.WaitGroup

type RedisOrderBookSnapshotHandler

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

func (RedisOrderBookSnapshotHandler) Update

func (handler RedisOrderBookSnapshotHandler) Update(key string, bookSnapshot *common.SnapshotV2) sync.WaitGroup

Jump to

Keyboard shortcuts

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