data

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FullBlock

type FullBlock struct {
	Block    types.Block
	Receipts Receipts
	Uncles   []types.Block
	// contains filtered or unexported fields
}

func (*FullBlock) RegisterStorables

func (fb *FullBlock) RegisterStorables()

RegisterStorables instantiates all the storables defined via code with the requested raw data Only the storables that are registered will be executed when the Store function is called

func (*FullBlock) Store

func (fb *FullBlock) Store(db *sql.DB, m *metrics.Provider) error

Store will open a database transaction and execute all the registered Storables in the said transaction

type Receipts added in v1.2.0

type Receipts []types.Receipt

func (Receipts) Len added in v1.2.0

func (a Receipts) Len() int

func (Receipts) Less added in v1.2.0

func (a Receipts) Less(i, j int) bool

func (Receipts) Swap added in v1.2.0

func (a Receipts) Swap(i, j int)

type Storable

type Storable interface {
	ToDB(tx *sql.Tx) error
}

Storable role: a Storable serves as a means of transforming raw data and inserting it into the database input: raw Ethereum data + a database transaction output: processed/derived/enhanced data stored directly to the db

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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