traces

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader interface {
	// Download traces or returning an error with the failure
	Download(txID common.Hash, blockIO flow.Identifier) (json.RawMessage, error)
}

type Engine

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

func NewTracesIngestionEngine

func NewTracesIngestionEngine(
	initEVMHeight uint64,
	blocksPublisher *models.Publisher,
	blocks storage.BlockIndexer,
	traces storage.TraceIndexer,
	downloader Downloader,
	logger zerolog.Logger,
	collector metrics.Collector,
) *Engine

func (*Engine) Done

func (e *Engine) Done() <-chan struct{}

func (*Engine) Error added in v0.23.1

func (e *Engine) Error() <-chan error

Error is required by the publisher, and we just return a nil, since the errors are handled gracefully in the indexBlockTraces

func (*Engine) ID added in v0.23.1

func (e *Engine) ID() uuid.UUID

ID is required by the publisher interface and we return a random uuid since the subscription will only happen once by this engine

func (*Engine) Notify

func (e *Engine) Notify(data any)

Notify is a handler that is being used to subscribe for new EVM block notifications. This method should be non-blocking.

func (*Engine) Ready

func (e *Engine) Ready() <-chan struct{}

func (*Engine) Run

func (e *Engine) Run(ctx context.Context) error

func (*Engine) Stop

func (e *Engine) Stop()

type GCPDownloader

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

func NewGCPDownloader

func NewGCPDownloader(bucketName string, logger zerolog.Logger) (*GCPDownloader, error)

func (*GCPDownloader) Download

func (g *GCPDownloader) Download(txID common.Hash, blockID flow.Identifier) (json.RawMessage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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