Documentation ¶
Index ¶
- type Config
- type Driver
- func (d *Driver) Accumulate(res interface{}) pool.Runner
- func (d *Driver) Blockchain() string
- func (d *Driver) Delete(object interface{}, model interface{}) error
- func (d *Driver) FetchABI(ctx context.Context, deployments []string) (map[string]*models.Contract, error)
- func (d *Driver) FetchMetadata(ctx context.Context, deployments []string, blockNumber uint64) (map[string]*models.Contract, error)
- func (d *Driver) FetchSequence(blockHeight uint64) map[string]pool.Runner
- func (d *Driver) Fetchers() map[string]pool.FeedTransformer
- func (d *Driver) Find(object interface{}, model interface{}) ([]interface{}, error)
- func (d *Driver) GetChainTipNumber(ctx context.Context) (uint64, error)
- func (d *Driver) Upsert(object interface{}, model interface{}) error
- func (d *Driver) UpsertBatch(objects []interface{}, model interface{}) error
- func (d *Driver) Writers() []pool.FeedTransformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MaxRetries int `env:"HTTP_MAX_RETRIES" envDefault:"5"` Blockchain constants.Blockchain `env:"BLOCKCHAIN,required"` }
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, logger util.Logger, metrics util.Metrics, cursor uint64) (*Driver, error)
NewDriver constructs a new Driver
func (*Driver) Accumulate ¶
Accumulate combines ABI and metadata to form complete contracts and fragments using result from the "fetch" step
func (*Driver) Blockchain ¶
Blockchain returns the name of the blockchain
func (*Driver) FetchMetadata ¶
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) UpsertBatch ¶
func (*Driver) Writers ¶
func (d *Driver) Writers() []pool.FeedTransformer
Writers defines a set of parallelizable write steps for processing contracts, method fragments, event fragments
Click to show internal directories.
Click to hide internal directories.