worker

package
v1.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 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 SourceType

type SourceType string

SourceType represents the type of data source

const (
	// SourceTypeRPC represents RPC data source
	SourceTypeRPC SourceType = "rpc"
	// SourceTypeArchive represents archive data source (e.g., S3)
	SourceTypeArchive SourceType = "archive"
)

func (SourceType) String

func (s SourceType) String() string

String returns the string representation of the source type

type Worker

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

Worker handles block data fetching from RPC and optional archive

func NewWorker

func NewWorker(rpc rpc.IRPCClient) *Worker

func NewWorkerWithArchive

func NewWorkerWithArchive(rpc rpc.IRPCClient, source source.ISource) *Worker

NewWorkerWithArchive creates a new Worker with optional archive support

func (*Worker) Close

func (w *Worker) Close() error

Close gracefully shuts down the worker and cleans up resources

func (*Worker) Run

func (w *Worker) Run(ctx context.Context, blockNumbers []*big.Int) []rpc.GetFullBlockResult

Run processes blocks using either archive OR rpc

Jump to

Keyboard shortcuts

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