pipeline

package
v0.8.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

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

func NewPipeline

func NewPipeline(o PipelineOpts) *Pipeline

func (*Pipeline) Run

func (md *Pipeline) Run(ctx context.Context, blockNumber uint64) error

Run is the task executor which runs in its own goroutine and does the following: 1. Fetches the block and all transactional data 2. Passes the block through all filters 3. Commits the block to store as successfully processed

Note: - Blocks are processed atomically, a failure in-between will process the block from the start - Therefore, any side effect/event sink in the filter should support dedup

type PipelineOpts

type PipelineOpts struct {
	BlockFetcher fetch.Fetch
	Filters      []filter.Filter
	Logg         logf.Logger
	Store        store.Store[pgx.Rows]
}

Jump to

Keyboard shortcuts

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