types

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName   = "stream"
	QuerierRoute = ModuleName
	// RouterKey is the msg router key for the backend module
	RouterKey = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountKeeper

type AccountKeeper interface {
	SetObserverKeeper(observer auth.ObserverI)
}

type DexKeeper

type DexKeeper interface {
	GetTokenPairs(ctx sdk.Context) []*dex.TokenPair
	SetObserverKeeper(keeper dex.StreamKeeper)
}

type EngineEnqueue

type EngineEnqueue func(data IStreamData) bool

type FarmKeeper

type FarmKeeper interface {
	SetObserverKeeper(k farmtypes.BackendKeeper)
}

FarmKeeper expected farm keeper

type IDistributeStateService

type IDistributeStateService interface {
	GetLockerID() string
	GetDistState(stateKey string) (string, error)
	SetDistState(stateKey string, stateValue string) error
	FetchDistLock(lockKey string, locker string, expiredInMS int) (bool, error)
	ReleaseDistLock(lockKey string, locker string) (bool, error)
	UnlockDistLockWithState(lockKey string, locker string, stateKey string, stateValue string) (bool, error)
}

Distributed State Service Interface

type IStreamData

type IStreamData interface {
	BlockHeight() int64
	DataType() StreamDataKind
}

***********************************

type IStreamDatas

type IStreamDatas []IStreamData

func (IStreamDatas) Len

func (datas IStreamDatas) Len() int

nolint

func (IStreamDatas) Less

func (datas IStreamDatas) Less(i, j int) bool

func (IStreamDatas) Sort

func (datas IStreamDatas) Sort() IStreamDatas

Sort is a helper function to sort the set of IStreamDatas in-place.

func (IStreamDatas) Swap

func (datas IStreamDatas) Swap(i, j int)

type IStreamEngine

type IStreamEngine interface {
	URL() string
	Write(data IStreamData, success *bool)
}

***********************************

type OrderKeeper

type OrderKeeper interface {
	GetOrder(ctx sdk.Context, orderID string) *order.Order
	GetUpdatedOrderIDs() []string
	GetBlockOrderNum(ctx sdk.Context, blockHeight int64) int64
	GetBlockMatchResult() *order.BlockMatchResult
	GetLastPrice(ctx sdk.Context, product string) sdk.Dec
	GetBestBidAndAsk(ctx sdk.Context, product string) (sdk.Dec, sdk.Dec)
	GetUpdatedDepthbookKeys() []string
	GetDepthBookCopy(product string) *order.DepthBook
	GetProductPriceOrderIDs(key string) []string
	GetTxHandlerMsgResult() []bitset.BitSet
}

type StreamDataKind

type StreamDataKind byte
const (
	StreamDataNilKind       StreamDataKind = 0x00
	StreamDataAnalysisKind  StreamDataKind = 0x01
	StreamDataNotifyKind    StreamDataKind = 0x02
	StreamDataKlineKind     StreamDataKind = 0x03
	StreamDataWebSocketKind StreamDataKind = 0x04
)

type SwapKeeper

type SwapKeeper interface {
	SetObserverKeeper(k ammswaptypes.BackendKeeper)
	GetSwapTokenPairs(ctx sdk.Context) []ammswap.SwapTokenPair
}

SwapKeeper expected swap keeper

type TokenKeeper

type TokenKeeper interface {
	GetFeeDetailList() []*token.FeeDetail
	GetCoinsInfo(ctx sdk.Context, addr sdk.AccAddress) token.CoinsInfo
}

Jump to

Keyboard shortcuts

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