controller

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_REQS_PER_SEC = 200
View Source
const NUM_PARALLEL_QUERIES = 50
View Source
const N_MAX_RETRIES = 3
View Source
const N_POSITIONS_REFRESH_ON_SWAP = 50
View Source
const POSITION_CHANNEL_WINDOW = 1000
View Source
const QUERY_CHANNEL_WINDOW = 25000
View Source
const QUERY_WORKER_QUEUE = 1000
View Source
const RECENT_EVENT_WINDOW = 60

Historical events won't require followup, because an RPC call should * be sync'd

View Source
const REFRESH_CYCLE_TIME = 10 * 60
View Source
const REFRESH_WINDOW = 15
View Source
const RETRY_QUERY_MAX_WAIT = 15
View Source
const RETRY_QUERY_MIN_WAIT = 5
View Source
const SUBGRAPH_POLL_SECS = 1
View Source
const UPDATE_CHANNEL_SIZE = 16000

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func New

func New(netCfg loader.NetworkConfig, cache *cache.MemoryCache) *Controller

func (*Controller) OnNetwork

func (c *Controller) OnNetwork(network types.NetworkName) *ControllerOverNetwork

type ControllerOverNetwork

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

func (*ControllerOverNetwork) FlushSyncCycle

func (c *ControllerOverNetwork) FlushSyncCycle(time int)

Called to indicate that all tables have completed the most recent sync cycle up * to the checkpointed time.

func (*ControllerOverNetwork) IngestAggEvent

func (c *ControllerOverNetwork) IngestAggEvent(r tables.AggEvent)

func (*ControllerOverNetwork) IngestBalance

func (c *ControllerOverNetwork) IngestBalance(b tables.Balance)

func (*ControllerOverNetwork) IngestFee

func (c *ControllerOverNetwork) IngestFee(l tables.FeeChange)

func (*ControllerOverNetwork) IngestKnockout

func (c *ControllerOverNetwork) IngestKnockout(r tables.KnockoutCross)

func (*ControllerOverNetwork) IngestLiqChange

func (c *ControllerOverNetwork) IngestLiqChange(l tables.LiqChange)

func (*ControllerOverNetwork) IngestSwap

func (c *ControllerOverNetwork) IngestSwap(l tables.Swap)

type HandleRefresher

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

func NewHandleRefresher

func NewHandleRefresher(hndl IRefreshHandle, queue chan IRefreshHandle) *HandleRefresher

func (*HandleRefresher) PushRefresh

func (r *HandleRefresher) PushRefresh(eventTime int)

type IMsgType

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

type IRefreshHandle

type IRefreshHandle interface {
	RefreshQuery(query *loader.CrocQuery)
	LabelTag() string
}

type KnockoutAliveHandle

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

func (*KnockoutAliveHandle) LabelTag

func (p *KnockoutAliveHandle) LabelTag() string

func (*KnockoutAliveHandle) RefreshQuery

func (p *KnockoutAliveHandle) RefreshQuery(query *loader.CrocQuery)

type KnockoutPostHandle

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

func (*KnockoutPostHandle) LabelTag

func (p *KnockoutPostHandle) LabelTag() string

func (*KnockoutPostHandle) RefreshQuery

func (p *KnockoutPostHandle) RefreshQuery(query *loader.CrocQuery)

type LiquidityRefresher

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

func NewLiquidityRefresher

func NewLiquidityRefresher(query *loader.CrocQuery) *LiquidityRefresher

type PositionRefreshHandle

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

func (*PositionRefreshHandle) LabelTag

func (p *PositionRefreshHandle) LabelTag() string

func (*PositionRefreshHandle) RefreshQuery

func (p *PositionRefreshHandle) RefreshQuery(query *loader.CrocQuery)

type RefreshAccumulator

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

type SubgraphSyncer

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

func NewSubgraphPriceSyncer

func NewSubgraphPriceSyncer(controller *Controller, chainConfig loader.ChainConfig, network types.NetworkName) SubgraphSyncer

func NewSubgraphSyncer

func NewSubgraphSyncer(controller *Controller, chainConfig loader.ChainConfig, network types.NetworkName) SubgraphSyncer

Jump to

Keyboard shortcuts

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