types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Publish(interface{}) error
	Consume() interface{}
}

type Batch

type Batch struct {
	BlockNumber   int64
	BlockTime     time.Time
	MarketID      store.EntityID
	ClearingPrice sdk.Uint
	Bids          []matcheng.AggregatePrice
	Asks          []matcheng.AggregatePrice
}

type BurnCreated

type BurnCreated struct {
	ID          store.EntityID
	AssetID     store.EntityID
	BlockNumber int64
	Burner      sdk.AccAddress
	Beneficiary []byte
	Quantity    sdk.Uint
}

type EventHandler

type EventHandler interface {
	OnEvent(event interface{}) error
}

type Fill

type Fill struct {
	OrderID     store.EntityID
	MarketID    store.EntityID
	Owner       sdk.AccAddress
	Pair        string
	Direction   matcheng.Direction
	QtyFilled   sdk.Uint
	QtyUnfilled sdk.Uint
	BlockNumber int64
	BlockTime   int64
	Price       sdk.Uint
}

type LocalConsumer

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

func NewLocalConsumer

func NewLocalConsumer(queue Backend, hdlrs []EventHandler) *LocalConsumer

func (*LocalConsumer) Start

func (s *LocalConsumer) Start()

func (*LocalConsumer) Stop

func (s *LocalConsumer) Stop()

type MemBackend

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

func NewMemBackend

func NewMemBackend() *MemBackend

func (*MemBackend) Consume

func (m *MemBackend) Consume() interface{}

func (*MemBackend) Publish

func (m *MemBackend) Publish(item interface{}) error

func (*MemBackend) Start

func (m *MemBackend) Start()

func (*MemBackend) Stop

func (m *MemBackend) Stop()

type OrderCancelled

type OrderCancelled struct {
	OrderID store.EntityID
}

type OrderCreated

type OrderCreated struct {
	ID                store.EntityID
	Owner             sdk.AccAddress
	MarketID          store.EntityID
	Direction         matcheng.Direction
	Price             sdk.Uint
	Quantity          sdk.Uint
	TimeInForceBlocks uint16
	CreatedBlock      int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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