sync

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartNearHead

func StartNearHead(ctx context.Context, wg *sync.WaitGroup, config NearHeadConfig) (*nearhead.EthCache, error)

StartNearHead starts to sync the near head data in separate goroutines, and returns the corresponding near head cache to query blockchain data with high performance.

Types

type Config

type Config struct {
	CatchUp struct {
		Adapter evm.AdapterConfig
		Poller  poll.CatchUpOption
		Writer  store.BatchWriteOption
	}

	Adapter evm.AdapterConfig
	Poller  poll.Option
	Writer  store.WriteOption
}

type NearHeadConfig

type NearHeadConfig struct {
	Adapter evm.AdapterConfig
	Poller  poll.Option
	Writer  nearhead.WriteOption
	Cache   nearhead.Config
}

type Worker

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

func NewWorker

func NewWorker(config Config, store store.Writable) (*Worker, error)

func (*Worker) Run

func (worker *Worker) Run(ctx context.Context, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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