worker

package
v1.2.4-beta Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_RPC_CHUNK_SIZE = 25
)

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"
	// SourceTypeStaging represents staging data source (e.g., S3)
	SourceTypeStaging SourceType = "staging"
)

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 NewWorkerWithSources

func NewWorkerWithSources(rpc rpc.IRPCClient, archive source.ISource, staging source.ISource) *Worker

NewWorkerWithSources creates a new Worker with optional archive and staging 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