Documentation ¶
Index ¶
- type DBHandler
- type Engine
- func (e *Engine) HandleCancelOrder(order *common.MemoryOrder) (msg *common.WebSocketMessage, success bool)
- func (e *Engine) HandleNewOrder(order *common.MemoryOrder) (matchResult common.MatchResult, hasMatch bool)
- func (e *Engine) ReInsertOrder(order *common.MemoryOrder) (msg *common.WebSocketMessage)
- func (e *Engine) RegisterDBHandler(handler DBHandler)
- func (e *Engine) RegisterOrderBookActivitiesHandler(handler OrderBookActivitiesHandler)
- func (e *Engine) RegisterOrderBookSnapshotHandler(handler OrderBookSnapshotHandler)
- type MarketHandler
- type OrderBookActivitiesHandler
- type OrderBookSnapshotHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct { // Wait for all queue handler exit gracefully Wg sync.WaitGroup // contains filtered or unexported fields }
func (*Engine) HandleCancelOrder ¶
func (e *Engine) HandleCancelOrder(order *common.MemoryOrder) (msg *common.WebSocketMessage, success bool)
func (*Engine) HandleNewOrder ¶
func (e *Engine) HandleNewOrder(order *common.MemoryOrder) (matchResult common.MatchResult, hasMatch bool)
func (*Engine) ReInsertOrder ¶
func (e *Engine) ReInsertOrder(order *common.MemoryOrder) (msg *common.WebSocketMessage)
func (*Engine) RegisterDBHandler ¶
func (*Engine) RegisterOrderBookActivitiesHandler ¶
func (e *Engine) RegisterOrderBookActivitiesHandler(handler OrderBookActivitiesHandler)
func (*Engine) RegisterOrderBookSnapshotHandler ¶
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
}
Click to show internal directories.
Click to hide internal directories.