indexer

package
v0.0.0-...-3fff15a Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = module.Module{
	{Constructor: NewConfig},
	{Constructor: NewIndexer},
}

Module indexer worker

Functions

This section is empty.

Types

type Config

type Config struct {
	Addresses   []string
	ChainSize   int
	ScanTimeout time.Duration
	SyncTimeout time.Duration
}

Config is worker settings

func NewConfig

func NewConfig(v *viper.Viper) (*Config, error)

type Indexer

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

Indexer - is a worker, that find transactions in block-chain

func NewIndexer

func NewIndexer(params Params) *Indexer

NewIndexer worker

func (*Indexer) SyncBlocks

func (i *Indexer) SyncBlocks(ctx context.Context)

SyncBlocks to sync blocks and transactions:

func (*Indexer) SyncStore

func (i *Indexer) SyncStore(ctx context.Context)

SyncStore receive messages from channel and try to sync with store

type Params

type Params struct {
	dig.In

	Client *eth.Client
	Config *Config
	Logger *zap.SugaredLogger
	Store  *store.Store
	Viper  *viper.Viper
}

Params to create new worker

Jump to

Keyboard shortcuts

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