eth

package
v0.0.0-...-0333012 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandlerFunc

type EventHandlerFunc func(*types.Transaction, *types.Receipt) error

type ReceiptDownloader

type ReceiptDownloader struct {
	sync.Mutex
	// contains filtered or unexported fields
}

receiptDownloader allows to download multiple receipts at the same time.

func NewReceiptDownloader

func NewReceiptDownloader(client *ethclient.Client, concurrency int) *ReceiptDownloader

func (*ReceiptDownloader) Forget

func (r *ReceiptDownloader) Forget(txid common.Hash)

Forget (deletes) an already downloaded transaction.

func (*ReceiptDownloader) Get

func (r *ReceiptDownloader) Get(txid common.Hash) (*types.Receipt, error)

Get the requested transaction, if not still downloaded, it waits.

func (*ReceiptDownloader) Join

func (r *ReceiptDownloader) Join()

Join waits until all background jobs stopped

func (*ReceiptDownloader) Request

func (r *ReceiptDownloader) Request(txid common.Hash)

Request to download a transaction.

func (*ReceiptDownloader) Start

func (r *ReceiptDownloader) Start()

Start processing requests

func (*ReceiptDownloader) Stats

func (r *ReceiptDownloader) Stats() (queuelen, pendinglen int)

Stats retrieves the status.

func (*ReceiptDownloader) Stop

func (r *ReceiptDownloader) Stop()

Stop processing requests

type ReceiptTask

type ReceiptTask struct {
	Tx common.Hash

	Err     error
	Receipt *types.Receipt
	// contains filtered or unexported fields
}

receiptTask is a single receipt download task.

type SavePoint

type SavePoint interface {
	Load() (lastBlock uint64, lastTxIndex uint, err error)
	Save(lastBlock uint64, lastTxIndex uint) error
}

type ScanEventDispatcher

type ScanEventDispatcher struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewScanEventDispatcher

func NewScanEventDispatcher(client *ethclient.Client, handler EventHandlerFunc, savepoint SavePoint, netid string) *ScanEventDispatcher

func (*ScanEventDispatcher) Join

func (e *ScanEventDispatcher) Join()

Join waits all background jobs finished

func (*ScanEventDispatcher) Start

func (e *ScanEventDispatcher) Start()

Start scanning the blockchain for events

func (*ScanEventDispatcher) Stop

func (e *ScanEventDispatcher) Stop()

Stop scanning the blockchain for events

Jump to

Keyboard shortcuts

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