cache

package
v0.0.0-...-c8ab65e Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccumTagged

type AccumTagged struct {
	model.AccumPoolStats
	types.PoolLocation
}

type MemoryCache

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

func New

func New() *MemoryCache

func (*MemoryCache) AddPoolEvent

func (m *MemoryCache) AddPoolEvent(tx types.PoolTxEvent)

func (*MemoryCache) AddUserBalance

func (m *MemoryCache) AddUserBalance(chainId types.ChainId, user types.EthAddress, token types.EthAddress)

func (*MemoryCache) LatestBlock

func (m *MemoryCache) LatestBlock(chainId types.ChainId) int64

func (*MemoryCache) MaterializeKnockoutBook

func (m *MemoryCache) MaterializeKnockoutBook(loc types.BookLocation) *model.KnockoutSaga

func (*MemoryCache) MaterializeKnockoutPos

func (m *MemoryCache) MaterializeKnockoutPos(loc types.PositionLocation) *model.KnockoutSubplot

func (*MemoryCache) MaterializePoolLiqCurve

func (m *MemoryCache) MaterializePoolLiqCurve(loc types.PoolLocation) *model.LiquidityCurve

func (*MemoryCache) MaterializePoolTradingHist

func (m *MemoryCache) MaterializePoolTradingHist(loc types.PoolLocation) *model.PoolTradingHistory

func (*MemoryCache) MaterializePosition

func (m *MemoryCache) MaterializePosition(loc types.PositionLocation) *model.PositionTracker

func (*MemoryCache) RetrieveAllPositions

func (m *MemoryCache) RetrieveAllPositions() map[types.PositionLocation]*model.PositionTracker

func (*MemoryCache) RetrieveChainAccums

func (m *MemoryCache) RetrieveChainAccums(chainId types.ChainId) []AccumTagged

func (*MemoryCache) RetrievePoolAccum

func (m *MemoryCache) RetrievePoolAccum(loc types.PoolLocation) model.AccumPoolStats

func (*MemoryCache) RetrievePoolAccumBefore

func (m *MemoryCache) RetrievePoolAccumBefore(loc types.PoolLocation, histTime int) model.AccumPoolStats

func (*MemoryCache) RetrievePoolAccumSeries

func (m *MemoryCache) RetrievePoolAccumSeries(loc types.PoolLocation, startTime int, endTime int) (model.AccumPoolStats, []model.AccumPoolStats)

func (*MemoryCache) RetrievePoolLimits

func (m *MemoryCache) RetrievePoolLimits(loc types.PoolLocation) map[types.PositionLocation]*model.KnockoutSubplot

func (*MemoryCache) RetrievePoolLiqCurve

func (m *MemoryCache) RetrievePoolLiqCurve(loc types.PoolLocation) (float64, []*model.LiquidityBump)

func (*MemoryCache) RetrievePoolPositions

func (m *MemoryCache) RetrievePoolPositions(loc types.PoolLocation) map[types.PositionLocation]*model.PositionTracker

func (*MemoryCache) RetrievePoolSet

func (m *MemoryCache) RetrievePoolSet() []types.PoolLocation

func (*MemoryCache) RetrieveUserBalances

func (m *MemoryCache) RetrieveUserBalances(chainId types.ChainId, user types.EthAddress) []types.EthAddress

func (*MemoryCache) RetrieveUserLimits

func (m *MemoryCache) RetrieveUserLimits(
	chainId types.ChainId,
	user types.EthAddress) map[types.PositionLocation]*model.KnockoutSubplot

func (*MemoryCache) RetrieveUserPoolLimits

func (m *MemoryCache) RetrieveUserPoolLimits(user types.EthAddress, pool types.PoolLocation) map[types.PositionLocation]*model.KnockoutSubplot

func (*MemoryCache) RetrieveUserPoolPositions

func (m *MemoryCache) RetrieveUserPoolPositions(user types.EthAddress, pool types.PoolLocation) map[types.PositionLocation]*model.PositionTracker

func (*MemoryCache) RetrieveUserPositions

func (m *MemoryCache) RetrieveUserPositions(
	chainId types.ChainId,
	user types.EthAddress) map[types.PositionLocation]*model.PositionTracker

func (*MemoryCache) RetrieveUserTxs

func (m *MemoryCache) RetrieveUserTxs(chainId types.ChainId, user types.EthAddress) []types.PoolTxEvent

func (*MemoryCache) RetrivePoolTxs

func (m *MemoryCache) RetrivePoolTxs(pool types.PoolLocation) []types.PoolTxEvent

type RWLockMap

type RWLockMap[Key comparable, Val any] struct {
	// contains filtered or unexported fields
}

type RWLockMapArray

type RWLockMapArray[Key comparable, Val any] struct {
	// contains filtered or unexported fields
}

type RWLockMapMap

type RWLockMapMap[Key comparable, KeyInner comparable, Val any] struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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