Documentation
¶
Index ¶
- Constants
- func GetDealsAndMatchResult(ctx sdk.Context, orderKeeper types.OrderKeeper) ([]*backend.Deal, []*backend.MatchResult, error)
- func GetMatchResults(ctx sdk.Context, orderKeeper types.OrderKeeper) []*backend.MatchResult
- func GetNewOrders(ctx sdk.Context, orderKeeper types.OrderKeeper) []*backend.Order
- func NewPool(redisURL string, redisPass string, logger log.Logger) (*redis.Pool, error)
- func ParseRedisURL(redisURL, requirePass string) (string, string, error)
- type Cache
- func (c *Cache) AddNewSwapTokenPair(swapTokenPair *ammswap.SwapTokenPair)
- func (c *Cache) AddNewTokenPair(tokenPair *types.TokenPair)
- func (c *Cache) AddSwapInfo(swapInfo *backend.SwapInfo)
- func (c *Cache) AddTransaction(transaction *backend.Transaction)
- func (c *Cache) AddUpdatedAccount(acc auth.Account)
- func (c *Cache) GetNewSwapTokenPairs() []*ammswap.SwapTokenPair
- func (c *Cache) GetNewTokenPairs() []*types.TokenPair
- func (c *Cache) GetSwapInfos() []*backend.SwapInfo
- func (c *Cache) GetTokenPairChanged() bool
- func (c *Cache) GetTransactions() []*backend.Transaction
- func (c *Cache) GetUpdatedAccAddress() (accs []sdk.AccAddress)
- func (c *Cache) Reset()
- func (c *Cache) SetTokenPairChanged(changed bool)
Constants ¶
View Source
const ( MaxIdle = 3 IdleTimeout = 240 )
Variables ¶
This section is empty.
Functions ¶
func GetDealsAndMatchResult ¶
func GetDealsAndMatchResult(ctx sdk.Context, orderKeeper types.OrderKeeper) ([]*backend.Deal, []*backend.MatchResult, error)
func GetMatchResults ¶
func GetMatchResults(ctx sdk.Context, orderKeeper types.OrderKeeper) []*backend.MatchResult
func GetNewOrders ¶
func ParseRedisURL ¶
Use redis URI scheme. URLs should follow the draft IANA specification for the scheme (https://www.iana.org/assignments/uri-schemes/prov/redis). eg. redis://user:password@localhost:6379, redis://localhost:16379 return: address, password, error
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) AddNewSwapTokenPair ¶ added in v0.13.0
func (c *Cache) AddNewSwapTokenPair(swapTokenPair *ammswap.SwapTokenPair)
AddNewSwapTokenPairs appends swapTokenPair to cache newSwapTokenPairs
func (*Cache) AddNewTokenPair ¶
AddNewTokenPair adds a new token pair into cache
func (*Cache) AddSwapInfo ¶ added in v0.13.0
AddSwapInfo appends swapInfo to cache SwapInfos
func (*Cache) AddTransaction ¶
func (c *Cache) AddTransaction(transaction *backend.Transaction)
func (*Cache) AddUpdatedAccount ¶
func (*Cache) GetNewSwapTokenPairs ¶ added in v0.13.0
func (c *Cache) GetNewSwapTokenPairs() []*ammswap.SwapTokenPair
nolint
func (*Cache) GetNewTokenPairs ¶
GetNewTokenPairs returns new token pairs from cache
func (*Cache) GetSwapInfos ¶ added in v0.13.0
nolint
func (*Cache) GetTokenPairChanged ¶
GetTokenPairChanged gets tokenPairChanged
func (*Cache) GetTransactions ¶
func (c *Cache) GetTransactions() []*backend.Transaction
func (*Cache) GetUpdatedAccAddress ¶
func (c *Cache) GetUpdatedAccAddress() (accs []sdk.AccAddress)
func (*Cache) SetTokenPairChanged ¶
SetTokenPairChanged sets tokenPairChanged
Click to show internal directories.
Click to hide internal directories.