monitor

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// L2NodeURL defines the URL L2 node (RPC) used by the monitor to query for txs receipts
	L2NodeURL string `mapstructure:"L2NodeURL"`

	// Workers is the number of monitor workers to query for txs receipts
	Workers uint16 `mapstructure:"Workers"`

	// QueueSize is the size of the queue for L2 txs that need to be monitored to get the tx receipt
	QueueSize uint16 `mapstructure:"QueueSize"`

	// InitialWaitInterval is the time the monitor worker will wait before to try get the tx receipt for first time
	InitialWaitInterval types.Duration `mapstructure:"InitialWaitInterval"`

	// RetryWaitInterval is the time the monitor worker will wait before to retry to get the tx receipt if it still doesn't exists
	RetryWaitInterval types.Duration `mapstructure:"RetryWaitInterval"`

	// TxLifetimeMax is the time a tx can be monitored waiting for the receipt
	TxLifeTimeMax types.Duration `mapstructure:"TxLifeTimeMax"`
}

Config for pool-manager monitor

type Monitor

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

func NewMonitor

func NewMonitor(cfg Config, poolDB poolDBInterface) *Monitor

func (*Monitor) AddL2Transaction

func (m *Monitor) AddL2Transaction(l2Tx *types.L2Transaction)

func (*Monitor) Start

func (m *Monitor) Start()

Jump to

Keyboard shortcuts

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