Documentation ¶
Index ¶
- func ProtoBlockToParquet(in *protos.Block) *model.ParquetBlock
- func ProtoLogToParquet(in *protos.Log) *model.ParquetLog
- func ProtoTraceToParquet(inTrace *protos.CallTrace, inTransaction *protos.Transaction, hash string, ...) *model.ParquetTrace
- func ProtoTransactionToParquet(inTx *protos.Transaction, inReceipt *protos.TransactionReceipt) (*model.ParquetTransaction, error)
- type Config
- type Driver
- func (d *Driver) Accumulate(res interface{}) pool.Runner
- func (d *Driver) Blockchain() string
- func (d *Driver) FetchSequence(blockHeight uint64) map[string]pool.Runner
- func (d *Driver) GetChainTipNumber(ctx context.Context) (uint64, error)
- func (d *Driver) IsValidBlock(ctx context.Context, index uint64) error
- func (d *Driver) Writers() []pool.FeedTransformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoBlockToParquet ¶
func ProtoBlockToParquet(in *protos.Block) *model.ParquetBlock
ProtoBlockToParquet converts a block proto to parquet
func ProtoLogToParquet ¶
func ProtoLogToParquet(in *protos.Log) *model.ParquetLog
ProtoLogToParquet converts a log proto to parquet
func ProtoTraceToParquet ¶
func ProtoTraceToParquet(inTrace *protos.CallTrace, inTransaction *protos.Transaction, hash string, parentHash string, index int64) *model.ParquetTrace
ProtoTraceToParquet converts a trace proto to parquet, given a trace, a transaction, and other supplemental data
func ProtoTransactionToParquet ¶
func ProtoTransactionToParquet(inTx *protos.Transaction, inReceipt *protos.TransactionReceipt) (*model.ParquetTransaction, error)
ProtoTransactionToParquet converts a transaction proto to parquet, given a transaction and receipt
Types ¶
type Config ¶
type Config struct { MaxRetries int `env:"HTTP_MAX_RETRIES" envDefault:"10"` DirectoryRange uint64 `env:"BUCKET_DIRECTORY_RANGE" envDefault:"10000"` }
Config stores configurable properties of the driver
func MustParseConfig ¶
MustParseConfig uses env.Parse to initialize config with environment variables
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the container for all ETL business logic
func NewDriver ¶
func NewDriver(cfg *Config, nodeClient nodeClient.Client, innerStore storage.Store, logger util.Logger) *Driver
NewDriver constructs a new Driver
func (*Driver) Accumulate ¶
Accumulate combines a block, receipts, and traces from multiple protos into a single object, given a generic result from the "fetch" step
func (*Driver) Blockchain ¶
Blockchain returns the name of the blockchain
func (*Driver) FetchSequence ¶
FetchSequence defines the parallelizable steps in the fetch sequence
func (*Driver) GetChainTipNumber ¶
GetChainTipNumber gets the block number of the chaintip
func (*Driver) IsValidBlock ¶
IsValidBlock checks the given block's parent hash against the hash of the previous block
func (*Driver) Writers ¶
func (d *Driver) Writers() []pool.FeedTransformer
Writers defines a set of parallelizable write steps for processing a block and its children