worker

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchFetchResult

type BatchFetchResult[T any] struct {
	BlockNumber *big.Int
	Error       error
	Result      T
}

type BlockFetchResult

type BlockFetchResult struct {
	BlockNumber  *big.Int
	Error        error
	Block        common.Block
	Transactions []common.Transaction
}

type LogsFetchResult

type LogsFetchResult struct {
	BlockNumber *big.Int
	Error       error
	Logs        []common.Log
}

type RawBlock

type RawBlock = map[string]interface{}

type RawLogs

type RawLogs = []map[string]interface{}

type RawTraces

type RawTraces = []map[string]interface{}

type TracesFetchResult

type TracesFetchResult struct {
	BlockNumber *big.Int
	Error       error
	Traces      []common.Trace
}

type Worker

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

func NewWorker

func NewWorker(rpc common.RPC) *Worker

func (*Worker) Run

func (w *Worker) Run(blockNumbers []*big.Int) []WorkerResult

type WorkerResult

type WorkerResult struct {
	BlockNumber  *big.Int
	Error        error
	Block        common.Block
	Transactions []common.Transaction
	Logs         []common.Log
	Traces       []common.Trace
}

func SerializeWorkerResults

func SerializeWorkerResults(chainId *big.Int, blocks []BatchFetchResult[RawBlock], logs []BatchFetchResult[RawLogs], traces []BatchFetchResult[RawTraces]) []WorkerResult

Jump to

Keyboard shortcuts

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