worker

package
v0.0.0-...-bf1eb11 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FILL_WORKER_NUM = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type BillExecutor

type BillExecutor struct {
	WorkerChs [workersNum]chan *entities.Bill
}

func NewBillExecutor

func NewBillExecutor() *BillExecutor

func (*BillExecutor) Start

func (s *BillExecutor) Start()

type FillExecutor

type FillExecutor struct {
	WorkerChs [FILL_WORKER_NUM]chan *entities.Fill
}

func NewFillExecutor

func NewFillExecutor() *FillExecutor

func (*FillExecutor) Start

func (s *FillExecutor) Start()

type FillMaker

type FillMaker struct {
	FillCh    chan *entities.Fill
	LogReader matching.LogReader
	LogOffset int64
	LogSeq    int64
}

func NewFillMaker

func NewFillMaker(logReader matching.LogReader) *FillMaker

func (*FillMaker) OnDoneLog

func (t *FillMaker) OnDoneLog(log *matching.DoneLog, offset int64)

func (*FillMaker) OnMatchLog

func (t *FillMaker) OnMatchLog(log *matching.MatchLog, offset int64)

func (*FillMaker) OnOpenLOg

func (t *FillMaker) OnOpenLOg(log *matching.OpenLog, offset int64)

func (*FillMaker) Start

func (t *FillMaker) Start()

type TickMaker

type TickMaker struct {
	Ticks     map[int64]*entities.Tick
	TickCh    chan entities.Tick
	LogReader matching.LogReader
	LogOffset int64
	LogSeq    int64
}

func NewTickMaker

func NewTickMaker(productId string, logReader matching.LogReader) *TickMaker

func (*TickMaker) OnDoneLog

func (t *TickMaker) OnDoneLog(log *matching.DoneLog, offset int64)

func (*TickMaker) OnMatchLog

func (t *TickMaker) OnMatchLog(log *matching.MatchLog, offset int64)

func (*TickMaker) OnOpenLOg

func (t *TickMaker) OnOpenLOg(log *matching.OpenLog, offset int64)

func (*TickMaker) Start

func (t *TickMaker) Start()

type TradeMaker

type TradeMaker struct {
	TradeCh   chan *entities.Trade
	LogReader matching.LogReader
	LogOffset int64
	LogSeq    int64
}

func NewTradeMaker

func NewTradeMaker(logReader matching.LogReader) *TradeMaker

func (*TradeMaker) OnDoneLog

func (t *TradeMaker) OnDoneLog(log *matching.DoneLog, offset int64)

func (*TradeMaker) OnMatchLog

func (t *TradeMaker) OnMatchLog(log *matching.MatchLog, offset int64)

func (*TradeMaker) OnOpenLOg

func (t *TradeMaker) OnOpenLOg(log *matching.OpenLog, offset int64)

func (*TradeMaker) Start

func (t *TradeMaker) Start()

Jump to

Keyboard shortcuts

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