order

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MPL-2.0 Imports: 43 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FeeByNativeToken = FeeType(0x01)
	FeeByTradeToken  = FeeType(0x02)

	ExpireFeeField       = "ExpireFee"
	ExpireFeeNativeField = "ExpireFeeNative"
	CancelFeeField       = "CancelFee"
	CancelFeeNativeField = "CancelFeeNative"
	FeeRateField         = "FeeRate"
	FeeRateNativeField   = "FeeRateNative"
	IOCExpireFee         = "IOCExpireFee"
	IOCExpireFeeNative   = "IOCExpireFeeNative"
)
View Source
const (
	BEP2TypeValue = 1
	MiniTypeValue = 2
)
View Source
const (
	RouteNewOrder    = "orderNew"
	RouteCancelOrder = "orderCancel"
)

Variables

View Source
var BUSDSymbol string
View Source
var (
	FeeRateMultiplier = big.NewInt(int64(math.Pow10(int(feeRateDecimals))))
)
View Source
var NewWALDeccoder = cs.NewWALDecoder
View Source
var NewWALEncoder = cs.NewWALEncoder
View Source
var OrderType = struct {
	LIMIT  int8
	MARKET int8
}{orderLimit, orderMarket}

OrderType is an enum of order type options supported by the matching engine

View Source
var PairType = struct {
	BEP2 SymbolPairType
	MINI SymbolPairType
}{BEP2TypeValue, MiniTypeValue}
View Source
var Side = struct {
	BUY  int8
	SELL int8
}{matcheng.BUYSIDE, matcheng.SELLSIDE}

Side/TimeInForce/OrderType are const, following FIX protocol convention Used as Enum

View Source
var TimeInForce = struct {
	GTE int8
	IOC int8
}{tifGTE, tifIOC}

TimeInForce is an enum of TIF (Time in Force) options supported by the matching engine

Functions

func CreateMatchEng

func CreateMatchEng(pairSymbol string, basePrice, lotSize int64) *me.MatchEng

func GenerateOrderID

func GenerateOrderID(sequence int64, addr sdk.AccAddress) string

GenerateOrderID generates an order ID

func IsValidOrderType

func IsValidOrderType(ot int8) bool

IsValidOrderType validates that an order type is valid and supported by the matching engine

func IsValidSide

func IsValidSide(side int8) bool

IsValidSide validates that a side is valid and supported by the matching engine

func IsValidTimeInForce

func IsValidTimeInForce(tif int8) bool

IsValidTimeInForce validates that a tif code is correct

func NewHandler

func NewHandler(dexKeeper *DexKeeper) sdk.Handler

NewHandler - returns a handler for dex type messages.

func NewWAL

func NewWAL(walPath string) (*orderbookWAL, error)

func RegisterWALMessages

func RegisterWALMessages(cdc *amino.Codec)

func SideStringToSideCode

func SideStringToSideCode(side string) (int8, error)

SideStringToSideCode converts a string like "BUY" to its internal side code

func TifStringToTifCode

func TifStringToTifCode(tif string) (int8, error)

TifStringToTifCode converts a string like "GTE" to its internal tif code

func TransferFromTrade

func TransferFromTrade(trade *me.Trade, symbol string, orderMap map[string]*OrderInfo) (Transfer, Transfer)

Types

type ActiveOrders

type ActiveOrders struct {
	Orders []OrderInfo `json:"orders"`
}

type BEP2OrderKeeper

type BEP2OrderKeeper struct {
	BaseOrderKeeper
	// contains filtered or unexported fields
}

type BEP2SymbolSelector

type BEP2SymbolSelector struct{}

func (*BEP2SymbolSelector) SelectSymbolsToMatch

func (bss *BEP2SymbolSelector) SelectSymbolsToMatch(roundOrders map[string][]string, height int64, matchAllSymbols bool) []string

type BaseOrderKeeper

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

in the future, this may be distributed via Sharding

func NewBaseOrderKeeper

func NewBaseOrderKeeper(moduleName string) BaseOrderKeeper

type CancelOrderMsg

type CancelOrderMsg struct {
	Sender sdk.AccAddress `json:"sender"`
	Symbol string         `json:"symbol"`
	RefId  string         `json:"refid"`
}

CancelOrderMsg represents a message to cancel an open order

func NewCancelOrderMsg

func NewCancelOrderMsg(sender sdk.AccAddress, symbol, refId string) CancelOrderMsg

NewCancelOrderMsg constructs a new CancelOrderMsg

func (CancelOrderMsg) GetInvolvedAddresses

func (msg CancelOrderMsg) GetInvolvedAddresses() []sdk.AccAddress

func (CancelOrderMsg) GetSignBytes

func (msg CancelOrderMsg) GetSignBytes() []byte

GetSignBytes - Get the bytes for the message signer to sign on

func (CancelOrderMsg) GetSigners

func (msg CancelOrderMsg) GetSigners() []sdk.AccAddress

func (CancelOrderMsg) Route

func (msg CancelOrderMsg) Route() string

nolint

func (CancelOrderMsg) String

func (msg CancelOrderMsg) String() string

func (CancelOrderMsg) Type

func (msg CancelOrderMsg) Type() string

func (CancelOrderMsg) ValidateBasic

func (msg CancelOrderMsg) ValidateBasic() sdk.Error

ValidateBasic is used to quickly disqualify obviously invalid messages quickly

type ChangeType

type ChangeType uint8
const (
	Ack            ChangeType = iota // new order tx
	Canceled                         // cancel order tx
	Expired                          // expired for gte order
	IocNoFill                        // ioc order is not filled expire
	IocExpire                        // ioc order is partial filled expire
	PartialFill                      // order is partial filled, derived from trade
	FullyFill                        // order is fully filled, derived from trade
	FailedBlocking                   // order tx is failed blocking, we only publish essential message
	FailedMatching                   // order failed matching
)

func (ChangeType) IsOpen

func (tpe ChangeType) IsOpen() bool

True for should not remove order in these status from OrderInfoForPub False for remove

func (ChangeType) String

func (tpe ChangeType) String() string

type ChangedPriceLevelsMap

type ChangedPriceLevelsMap map[string]ChangedPriceLevelsPerSymbol

type ChangedPriceLevelsPerSymbol

type ChangedPriceLevelsPerSymbol struct {
	Buys  map[int64]int64
	Sells map[int64]int64
}

type DexKeeper

type DexKeeper struct {
	PairMapper store.TradingPairMapper

	FeeManager                 *FeeManager
	RoundOrderFees             FeeHolder // order (and trade) related fee of this round, str of addr bytes -> fee
	CollectOrderInfoForPublish bool      //TODO separate for each order keeper

	OrderKeepers []DexOrderKeeper
	// contains filtered or unexported fields
}

func NewDexKeeper

func NewDexKeeper(key sdk.StoreKey, am auth.AccountKeeper, tradingPairMapper store.TradingPairMapper, codespace sdk.CodespaceType, concurrency uint, cdc *wire.Codec, collectOrderInfoForPublish bool) *DexKeeper

func (*DexKeeper) AddEngine

func (kp *DexKeeper) AddEngine(pair dexTypes.TradingPair) *me.MatchEng

func (*DexKeeper) AddOrder

func (kp *DexKeeper) AddOrder(info OrderInfo, isRecovery bool) (err error)

func (*DexKeeper) CanDelistTradingPair

func (kp *DexKeeper) CanDelistTradingPair(ctx sdk.Context, baseAsset, quoteAsset string) error

func (*DexKeeper) CanListTradingPair

func (kp *DexKeeper) CanListTradingPair(ctx sdk.Context, baseAsset, quoteAsset string) error

func (*DexKeeper) ClearAfterMatch

func (kp *DexKeeper) ClearAfterMatch()

func (*DexKeeper) ClearOrderBook

func (kp *DexKeeper) ClearOrderBook(pair string)

func (*DexKeeper) ClearOrderChanges

func (kp *DexKeeper) ClearOrderChanges()

func (*DexKeeper) ClearRoundFee

func (kp *DexKeeper) ClearRoundFee()

func (*DexKeeper) DelistTradingPair

func (kp *DexKeeper) DelistTradingPair(ctx sdk.Context, symbol string, postAllocTransHandler TransferHandler)

func (*DexKeeper) DetermineLotSize

func (kp *DexKeeper) DetermineLotSize(baseAssetSymbol, quoteAssetSymbol string, price int64) (lotSize int64)

func (*DexKeeper) EnablePublish

func (kp *DexKeeper) EnablePublish()

func (*DexKeeper) ExpireOrders

func (kp *DexKeeper) ExpireOrders(
	ctx sdk.Context,
	blockTime time.Time,
	postAlloTransHandler TransferHandler,
)

func (*DexKeeper) GetAllOrderChanges

func (kp *DexKeeper) GetAllOrderChanges() OrderChanges

func (*DexKeeper) GetAllOrderInfosForPub

func (kp *DexKeeper) GetAllOrderInfosForPub() OrderInfoForPublish

func (*DexKeeper) GetAllOrders

func (kp *DexKeeper) GetAllOrders() map[string]map[string]*OrderInfo

func (*DexKeeper) GetAllOrdersForPair

func (kp *DexKeeper) GetAllOrdersForPair(symbol string) map[string]*OrderInfo

ONLY FOR TEST USE

func (*DexKeeper) GetBreatheBlockHeight

func (kp *DexKeeper) GetBreatheBlockHeight(ctx sdk.Context, timeNow time.Time, daysBack int) (int64, error)

func (*DexKeeper) GetEngines

func (kp *DexKeeper) GetEngines() map[string]*me.MatchEng

func (*DexKeeper) GetLastBreatheBlockHeight

func (kp *DexKeeper) GetLastBreatheBlockHeight(ctx sdk.Context, latestBlockHeight int64, timeNow time.Time, blockInterval, daysBack int) int64

func (*DexKeeper) GetLastTrades

func (kp *DexKeeper) GetLastTrades(height int64, pair string) ([]me.Trade, int64)

func (*DexKeeper) GetLastTradesForPair

func (kp *DexKeeper) GetLastTradesForPair(pair string) ([]me.Trade, int64)

!!! FOR TEST USE ONLY

func (*DexKeeper) GetOpenOrders

func (kp *DexKeeper) GetOpenOrders(pair string, addr sdk.AccAddress) []store.OpenOrder

func (*DexKeeper) GetOrder

func (kp *DexKeeper) GetOrder(id string, symbol string, side int8, price int64) (ord me.OrderPart, err error)

func (*DexKeeper) GetOrderBookLevels

func (kp *DexKeeper) GetOrderBookLevels(pair string, maxLevels int) (orderbook []store.OrderBookLevel, pendingMatch bool)

func (*DexKeeper) GetOrderBooks

func (kp *DexKeeper) GetOrderBooks(maxLevels int) ChangedPriceLevelsMap

func (*DexKeeper) GetOrderChanges

func (kp *DexKeeper) GetOrderChanges(pairType SymbolPairType) OrderChanges

func (*DexKeeper) GetOrderInfosForPub

func (kp *DexKeeper) GetOrderInfosForPub(pairType SymbolPairType) OrderInfoForPublish

func (*DexKeeper) GetPairType

func (kp *DexKeeper) GetPairType(symbol string) SymbolPairType

func (*DexKeeper) GetPriceLevel

func (kp *DexKeeper) GetPriceLevel(pair string, side int8, price int64) *me.PriceLevel

func (*DexKeeper) Init

func (kp *DexKeeper) Init(ctx sdk.Context, blockInterval, daysBack int, blockStore *tmstore.BlockStore, stateDB dbm.DB, lastHeight int64, txDecoder sdk.TxDecoder)

func (*DexKeeper) InitRecentPrices

func (kp *DexKeeper) InitRecentPrices(ctx sdk.Context)

func (*DexKeeper) LoadOrderBookSnapshot

func (kp *DexKeeper) LoadOrderBookSnapshot(ctx sdk.Context, latestBlockHeight int64, timeOfLatestBlock time.Time, blockInterval, daysBack int) (int64, error)

func (*DexKeeper) MarkBreatheBlock

func (kp *DexKeeper) MarkBreatheBlock(ctx sdk.Context, height int64, blockTime time.Time)

func (*DexKeeper) MatchAndAllocateSymbols

func (kp *DexKeeper) MatchAndAllocateSymbols(ctx sdk.Context, postAlloTransHandler TransferHandler, matchAllSymbols bool)

func (*DexKeeper) MatchSymbols

func (kp *DexKeeper) MatchSymbols(height, timestamp int64, matchAllSymbols bool)

func (*DexKeeper) OrderExists

func (kp *DexKeeper) OrderExists(symbol, id string) (OrderInfo, bool)

func (*DexKeeper) ReloadOrder

func (kp *DexKeeper) ReloadOrder(symbol string, orderInfo *OrderInfo, height int64)

func (*DexKeeper) RemoveOrder

func (kp *DexKeeper) RemoveOrder(id string, symbol string, postCancelHandler func(ord me.OrderPart)) error

func (*DexKeeper) RemoveOrderInfosForPub

func (kp *DexKeeper) RemoveOrderInfosForPub(pair string, orderId string)

func (*DexKeeper) ReplayOrdersFromBlock

func (kp *DexKeeper) ReplayOrdersFromBlock(ctx sdk.Context, bc *tmstore.BlockStore, stateDb dbm.DB, lastHeight, breatheHeight int64,
	txDecoder sdk.TxDecoder) error

func (*DexKeeper) SelectSymbolsToMatch

func (kp *DexKeeper) SelectSymbolsToMatch(height int64, matchAllSymbols bool) []string

func (*DexKeeper) SetBUSDSymbol

func (kp *DexKeeper) SetBUSDSymbol(symbol string)

func (*DexKeeper) ShouldPublishOrder

func (kp *DexKeeper) ShouldPublishOrder() bool

func (*DexKeeper) SnapShotOrderBook

func (kp *DexKeeper) SnapShotOrderBook(ctx sdk.Context, height int64) (effectedStoreKeys []string, err error)

func (*DexKeeper) StoreTradePrices

func (kp *DexKeeper) StoreTradePrices(ctx sdk.Context)

func (*DexKeeper) SubscribeParamChange

func (kp *DexKeeper) SubscribeParamChange(hub *paramhub.Keeper)

func (*DexKeeper) UpdateLotSize

func (kp *DexKeeper) UpdateLotSize(symbol string, lotSize int64)

func (*DexKeeper) UpdateOrderChangeSync

func (kp *DexKeeper) UpdateOrderChangeSync(change OrderChange, symbol string)

func (*DexKeeper) UpdateTickSizeAndLotSize

func (kp *DexKeeper) UpdateTickSizeAndLotSize(ctx sdk.Context)

type DexOrderKeeper

type DexOrderKeeper interface {
	// contains filtered or unexported methods
}

func NewBEP2OrderKeeper

func NewBEP2OrderKeeper() DexOrderKeeper

NewBEP2OrderKeeper - Returns the BEP2OrderKeeper

func NewMiniOrderKeeper

func NewMiniOrderKeeper() DexOrderKeeper

NewBEP2OrderKeeper - Returns the MiniToken orderKeeper

type ExecutionType

type ExecutionType uint8
const (
	NEW ExecutionType = iota
)

func (ExecutionType) String

func (this ExecutionType) String() string

type ExpireHolder

type ExpireHolder struct {
	OrderId string
	Reason  ChangeType
	Fee     string
	Symbol  string
}

type ExpireTransfers

type ExpireTransfers []*Transfer

func (ExpireTransfers) Len

func (trans ExpireTransfers) Len() int

func (ExpireTransfers) Less

func (trans ExpireTransfers) Less(i, j int) bool

func (*ExpireTransfers) Sort

func (trans *ExpireTransfers) Sort()

func (ExpireTransfers) Swap

func (trans ExpireTransfers) Swap(i, j int)

type FeeConfig

type FeeConfig struct {
	ExpireFee          int64 `json:"expire_fee"`
	ExpireFeeNative    int64 `json:"expire_fee_native"`
	IOCExpireFee       int64 `json:"ioc_expire_fee"`
	IOCExpireFeeNative int64 `json:"ioc_expire_fee_native"`
	CancelFee          int64 `json:"cancel_fee"`
	CancelFeeNative    int64 `json:"cancel_fee_native"`
	FeeRate            int64 `json:"fee_rate"`
	FeeRateNative      int64 `json:"fee_rate_native"`
}

func NewFeeConfig

func NewFeeConfig() FeeConfig

func ParamToFeeConfig

func ParamToFeeConfig(feeParams []param.FeeParam) *FeeConfig

type FeeHandler

type FeeHandler func(map[string]*sdk.Fee)

type FeeHolder

type FeeHolder map[string]*sdk.Fee

type FeeManager

type FeeManager struct {
	FeeConfig FeeConfig
	// contains filtered or unexported fields
}

func NewFeeManager

func NewFeeManager(cdc *wire.Codec, logger tmlog.Logger) *FeeManager

func (*FeeManager) CalcExpiresFee

func (m *FeeManager) CalcExpiresFee(balances sdk.Coins, expireType transferEventType, expireTransfers ExpireTransfers, engines map[string]*matcheng.MatchEng, expireTransferHandler func(tran Transfer)) sdk.Fee

func (*FeeManager) CalcFixedFee

func (m *FeeManager) CalcFixedFee(balances sdk.Coins, eventType transferEventType, inAsset string, engines map[string]*matcheng.MatchEng) sdk.Fee

Note: the result of `CalcFixedFee` depends on the balances of the acc, so the right way of allocation is: 1. transfer the "inAsset" to the balance, i.e. call doTransfer() 2. call this method 3. deduct the fee right away

func (*FeeManager) CalcTradeFee

func (m *FeeManager) CalcTradeFee(balances sdk.Coins, tradeIn sdk.Coin, engines map[string]*matcheng.MatchEng) sdk.Fee

DEPRECATED Note1: the result of `CalcTradeFeeDeprecated` depends on the balances of the acc, so the right way of allocation is: 1. transfer the "inAsset" to the balance, i.e. call doTransfer() 2. call this method 3. deduct the fee right away

Note2: even though the function is called in multiple threads, `engines` map would stay the same as no other function may change it in fee calculation stage, so no race condition concern

func (*FeeManager) CalcTradesFee

func (m *FeeManager) CalcTradesFee(balances sdk.Coins, tradeTransfers TradeTransfers, engines map[string]*matcheng.MatchEng) sdk.Fee

func (*FeeManager) CancelFee

func (m *FeeManager) CancelFee(feeType FeeType) int64

func (*FeeManager) CancelFees

func (m *FeeManager) CancelFees() (int64, int64)

func (*FeeManager) ExpireFee

func (m *FeeManager) ExpireFee(feeType FeeType) int64

func (*FeeManager) ExpireFees

func (m *FeeManager) ExpireFees() (int64, int64)

func (*FeeManager) GetConfig

func (m *FeeManager) GetConfig() FeeConfig

func (*FeeManager) IOCExpireFee

func (m *FeeManager) IOCExpireFee(feeType FeeType) int64

func (*FeeManager) IOCExpireFees

func (m *FeeManager) IOCExpireFees() (int64, int64)

func (*FeeManager) TradeFee

func (m *FeeManager) TradeFee(amount *big.Int, feeType FeeType) *big.Int

func (*FeeManager) UpdateConfig

func (m *FeeManager) UpdateConfig(feeConfig FeeConfig) error

UpdateConfig should only happen when Init or in BreatheBlock

type FeeType

type FeeType uint8

type MiniOrderKeeper

type MiniOrderKeeper struct {
	BaseOrderKeeper
	// contains filtered or unexported fields
}

order keeper for mini-token

type MiniSymbolSelector

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

func (*MiniSymbolSelector) SelectSymbolsToMatch

func (mss *MiniSymbolSelector) SelectSymbolsToMatch(roundOrders map[string][]string, height int64, matchAllSymbols bool) []string

type NewOrderMsg

type NewOrderMsg struct {
	Sender      sdk.AccAddress `json:"sender"`
	Id          string         `json:"id"`
	Symbol      string         `json:"symbol"`
	OrderType   int8           `json:"ordertype"`
	Side        int8           `json:"side"`
	Price       int64          `json:"price"`
	Quantity    int64          `json:"quantity"`
	TimeInForce int8           `json:"timeinforce"`
}

func NewNewOrderMsg

func NewNewOrderMsg(sender sdk.AccAddress, id string, side int8,
	symbol string, price int64, qty int64) NewOrderMsg

NewNewOrderMsg constructs a new NewOrderMsg

func NewNewOrderMsgAuto

func NewNewOrderMsgAuto(txBuilder txbuilder.TxBuilder, sender sdk.AccAddress, side int8,
	symbol string, price int64, qty int64) (NewOrderMsg, error)

NewNewOrderMsgAuto constructs a new NewOrderMsg and auto-assigns its order ID

func (NewOrderMsg) GetInvolvedAddresses

func (msg NewOrderMsg) GetInvolvedAddresses() []sdk.AccAddress

func (NewOrderMsg) GetSignBytes

func (msg NewOrderMsg) GetSignBytes() []byte

GetSignBytes - Get the bytes for the message signer to sign on

func (NewOrderMsg) GetSigners

func (msg NewOrderMsg) GetSigners() []sdk.AccAddress

func (NewOrderMsg) Route

func (msg NewOrderMsg) Route() string

nolint

func (NewOrderMsg) String

func (msg NewOrderMsg) String() string

func (NewOrderMsg) Type

func (msg NewOrderMsg) Type() string

func (NewOrderMsg) ValidateBasic

func (msg NewOrderMsg) ValidateBasic() sdk.Error

ValidateBasic is used to quickly disqualify obviously invalid messages quickly

type NewOrderResponse

type NewOrderResponse struct {
	OrderID string `json:"order_id"`
}

type OrderBookSnapshot

type OrderBookSnapshot struct {
	Buys            []me.PriceLevel `json:"buys"`
	Sells           []me.PriceLevel `json:"sells"`
	LastTradePrice  int64           `json:"lasttradeprice"`
	LastMatchHeight int64           `json:"lastmatchheight"`
}

type OrderChange

type OrderChange struct {
	Id             string
	Tpe            ChangeType
	SingleFee      string
	MsgForFailedTx interface{} // pointer to NewOrderMsg or CancelOrderMsg
}

func (OrderChange) ResolveOrderInfo

func (oc OrderChange) ResolveOrderInfo(orderInfos OrderInfoForPublish) *OrderInfo

func (OrderChange) String

func (oc OrderChange) String() string

type OrderChanges

type OrderChanges []OrderChange // clean after publish each block's EndBlock and before next block's BeginBlock

type OrderInfo

type OrderInfo struct {
	NewOrderMsg
	CreatedHeight        int64
	CreatedTimestamp     int64
	LastUpdatedHeight    int64
	LastUpdatedTimestamp int64
	CumQty               int64
	TxHash               string

	TxSource int64 // this field is imported as a hard fork (#581), has to be last field to provide storage compatibility
}

type OrderInfoForPublish

type OrderInfoForPublish map[string]*OrderInfo

provide an easy way to retrieve order related static fields during generate executed order status

type SymbolPairType

type SymbolPairType int8

type SymbolSelector

type SymbolSelector interface {
	SelectSymbolsToMatch(roundOrders map[string][]string, height int64, matchAllSymbols bool) []string
}

type SymbolWithOrderNumber

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

type TimedWALMessage

type TimedWALMessage = cs.TimedWALMessage

type TradeTransfers

type TradeTransfers []*Transfer

func (TradeTransfers) Len

func (trans TradeTransfers) Len() int

func (TradeTransfers) Less

func (trans TradeTransfers) Less(i, j int) bool

func (*TradeTransfers) Sort

func (trans *TradeTransfers) Sort()

func (TradeTransfers) Swap

func (trans TradeTransfers) Swap(i, j int)

type Transfer

type Transfer struct {
	Oid string

	Fee    sdk.Fee
	Trade  *me.Trade
	Symbol string
	// contains filtered or unexported fields
}

Transfer represents a transfer between trade currencies

func TransferFromCanceled

func TransferFromCanceled(ord me.OrderPart, ordMsg OrderInfo, isMatchFailure bool) Transfer

func TransferFromExpired

func TransferFromExpired(ord me.OrderPart, ordMsg OrderInfo) Transfer

func (Transfer) FeeFree

func (tran Transfer) FeeFree() bool

func (*Transfer) IsBuyer

func (tran *Transfer) IsBuyer() bool

func (Transfer) IsExpire

func (tran Transfer) IsExpire() bool

func (Transfer) IsExpiredWithFee

func (tran Transfer) IsExpiredWithFee() bool

func (Transfer) IsNativeIn

func (tran Transfer) IsNativeIn() bool

func (Transfer) IsNativeOut

func (tran Transfer) IsNativeOut() bool

func (*Transfer) String

func (tran *Transfer) String() string

type TransferHandler

type TransferHandler func(Transfer)

type WAL

type WAL interface {
	Write(WALMessage)
	WriteSync(WALMessage)
	File() *os.File
	Start() error
	Stop() error
	Wait()
}

WAL is an interface for any write-ahead logger.

type WALDecoder

type WALDecoder = cs.WALDecoder

type WALEncoder

type WALEncoder = cs.WALEncoder

type WALMessage

type WALMessage interface{}

type WALSearchOptions

type WALSearchOptions struct {
	// IgnoreDataCorruptionErrors set to true will result in skipping data corruption errors.
	IgnoreDataCorruptionErrors bool
}

WALSearchOptions are optional arguments to SearchForEndHeight.

Jump to

Keyboard shortcuts

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