eventemitter

package
v0.0.0-...-491e088 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 2 Imported by: 24

Documentation

Index

Constants

View Source
const (
	NewOrder = "NewOrder"

	// Methods
	WethDeposit      = "WethDepositEvent"
	WethWithdrawal   = "WethWithdrawalEvent"
	Approve          = "ApproveMethod"
	Transfer         = "Transfer"
	EthTransferEvent = "EthTransferEvent"

	RingMined           = "RingMined"
	OrderFilled         = "OrderFilled"
	CancelOrder         = "CancelOrder"
	CutoffAll           = "Cutoff"
	CutoffPair          = "CutoffPair"
	TokenRegistered     = "TokenRegistered"
	TokenUnRegistered   = "TokenUnRegistered"
	RingHashSubmitted   = "RingHashSubmitted"
	AddressAuthorized   = "AddressAuthorized"
	AddressDeAuthorized = "AddressDeAuthorized"

	MinedOrderState            = "MinedOrderState" //orderbook send orderstate to miner
	WalletTransactionSubmitted = "WalletTransactionSubmitted"

	ExtractorFork   = "ExtractorFork" //chain forked
	Transaction     = "Transaction"
	GatewayNewOrder = "GatewayNewOrder"

	//Miner
	Miner_DeleteOrderState           = "Miner_DeleteOrderState"
	Miner_NewOrderState              = "Miner_NewOrderState"
	Miner_NewRing                    = "Miner_NewRing"
	Miner_RingMined                  = "Miner_RingMined"
	Miner_RingSubmitResult           = "Miner_RingSubmitResult"
	Miner_SubmitRing_Method          = "Miner_SubmitRing_Method"
	Miner_SubmitRingHash_Method      = "Miner_SubmitRingHash_Method"
	Miner_BatchSubmitRingHash_Method = "Miner_BatchSubmitRingHash_Method"

	// Block
	Block_New = "Block_New"
	Block_End = "Block_End"

	// Extractor
	SyncChainComplete = "SyncChainComplete"
	ChainForkDetected = "ChainForkDetected"
	ExtractorWarning  = "ExtractorWarning"

	// Transaction
	TransactionEvent   = "TransactionEvent"
	PendingTransaction = "PendingTransaction"

	// socketio notify event types
	LoopringTickerUpdated = "LoopringTickerUpdated"
	TrendUpdated          = "TrendUpdated"
	PortfolioUpdated      = "PortfolioUpdated"
	BalanceUpdated        = "BalanceUpdated"
	DepthUpdated          = "DepthUpdated"
	TransactionUpdated    = "TransactionUpdated"
)

Variables

This section is empty.

Functions

func Emit

func Emit(topic string, eventData EventData)

func NewSerialWatcher

func NewSerialWatcher(topic string, handle func(e EventData) error) (stopFunc func(), err error)

todo: impl it

func On

func On(topic string, watcher *Watcher)

func Un

func Un(topic string, watcher *Watcher)

Types

type EventData

type EventData interface{}

type Topic

type Topic string

type Watcher

type Watcher struct {
	Concurrent bool
	Handle     func(eventData EventData) error
}

Jump to

Keyboard shortcuts

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