listener

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDownloader

type BlockDownloader struct {
	*task.Task

	Output chan *arweave.Block
	// contains filtered or unexported fields
}

Task that periodically checks for new arweave network info. Optionally waits for a number of required confirmation blocks before emitting the info

func NewBlockDownloader

func NewBlockDownloader(config *config.Config) (self *BlockDownloader)

Using Arweave client periodically checks for blocks of transactions

func (*BlockDownloader) WithBackoff

func (self *BlockDownloader) WithBackoff(maxElapsedTime, maxInterval time.Duration) *BlockDownloader

func (*BlockDownloader) WithClient

func (self *BlockDownloader) WithClient(client *arweave.Client) *BlockDownloader

func (*BlockDownloader) WithHeightRange

func (self *BlockDownloader) WithHeightRange(start, stop uint64) *BlockDownloader

func (*BlockDownloader) WithInitStartHeight

func (self *BlockDownloader) WithInitStartHeight(db *gorm.DB, component model.SyncedComponent) *BlockDownloader

func (*BlockDownloader) WithInputChannel

func (self *BlockDownloader) WithInputChannel(v chan *arweave.NetworkInfo) *BlockDownloader

func (*BlockDownloader) WithMonitor

func (self *BlockDownloader) WithMonitor(monitor monitoring.Monitor) *BlockDownloader

type Component

type Component string
const (
	ComponentSyncer   Component = "syncer"
	ComponentContract Component = "contract"
)

type NetworkMonitor

type NetworkMonitor struct {
	*task.Task

	// Output channel
	Output chan *arweave.NetworkInfo
	// contains filtered or unexported fields
}

Task that periodically checks for new arweave network info. Optionally waits for a number of required confirmation blocks before emitting the info

func NewNetworkMonitor

func NewNetworkMonitor(config *config.Config) (self *NetworkMonitor)

Using Arweave client periodically checks for blocks of transactions

func (*NetworkMonitor) GetLastNetworkInfo

func (self *NetworkMonitor) GetLastNetworkInfo() *arweave.NetworkInfo

func (*NetworkMonitor) WithClient

func (self *NetworkMonitor) WithClient(client *arweave.Client) *NetworkMonitor

func (*NetworkMonitor) WithEnableOutput

func (self *NetworkMonitor) WithEnableOutput(v bool) *NetworkMonitor

func (*NetworkMonitor) WithInterval

func (self *NetworkMonitor) WithInterval(interval time.Duration) *NetworkMonitor

func (*NetworkMonitor) WithMonitor

func (self *NetworkMonitor) WithMonitor(monitor monitoring.Monitor) *NetworkMonitor

func (*NetworkMonitor) WithRequiredConfirmationBlocks

func (self *NetworkMonitor) WithRequiredConfirmationBlocks(requiredConfirmationBlocks int64) *NetworkMonitor

type Payload

type Payload struct {
	BlockHash      arweave.Base64String
	BlockHeight    int64
	BlockTimestamp int64
	Transactions   []*arweave.Transaction
}

type TransactionDownloader

type TransactionDownloader struct {
	*task.Task

	Output chan *Payload
	// contains filtered or unexported fields
}

Fills in transactions for a given block

func NewTransactionDownloader

func NewTransactionDownloader(config *config.Config) (self *TransactionDownloader)

Using Arweave client periodically checks for blocks of transactions

func (*TransactionDownloader) WithBackoff

func (self *TransactionDownloader) WithBackoff(maxElapsedTime, maxInterval time.Duration) *TransactionDownloader

func (*TransactionDownloader) WithClient

func (self *TransactionDownloader) WithClient(client *arweave.Client) *TransactionDownloader

func (*TransactionDownloader) WithFilterContracts

func (self *TransactionDownloader) WithFilterContracts() *TransactionDownloader

func (*TransactionDownloader) WithFilterInteractions

func (self *TransactionDownloader) WithFilterInteractions() *TransactionDownloader

func (*TransactionDownloader) WithInputChannel

func (self *TransactionDownloader) WithInputChannel(v chan *arweave.Block) *TransactionDownloader

func (*TransactionDownloader) WithMonitor

func (self *TransactionDownloader) WithMonitor(monitor monitoring.Monitor) *TransactionDownloader

Jump to

Keyboard shortcuts

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