Versions in this module Expand all Collapse all v1 v1.0.0 Jun 26, 2019 Changes in this version + const BLOCK_MODE + const BULK_INSERT_SIZE + const HEAD_MODE + const TX_KEY_FACTOR + var DefaultDBConfig = &DBConfig + func MakeSummaryDBRow(sa SummaryArguments) (cols string, vals []interface{}, count int, err error) + func MakeTxDBRow(block *types.Block, txKey uint64, tx *types.Transaction, ...) (string, []interface{}, TxMapArguments, SummaryArguments, error) + func MakeTxMappingRow(tm TxMapArguments) (cols string, vals []interface{}, count int, err error) + type BulkInsertQuery struct + type BulkInsertRequest struct + type BulkInsertResult struct + type DBConfig struct + BlockChannelSize int + BulkInsertSize int + ConnMaxLifetime time.Duration + DBHost string + DBName string + DBPassword string + DBPort string + DBUser string + EnabledDBSyncer bool + EnabledLogMode bool + EventMode string + GenQueryThread int + InsertThread int + MaxBlockDiff uint64 + MaxIdleConns int + MaxOpenConns int + Mode string + func (d *DBConfig) UnmarshalTOML(unmarshal func(interface{}) error) error + func (d DBConfig) MarshalTOML() (interface{}, error) + type DBSyncer struct + HandleBlock func(block *types.Block) error + func NewDBSyncer(ctx *node.ServiceContext, cfg *DBConfig) (*DBSyncer, error) + func (ds *DBSyncer) APIs() []rpc.API + func (ds *DBSyncer) Components() []interface{} + func (ds *DBSyncer) HandleChainEvent(block *types.Block) error + func (ds *DBSyncer) HandleChainEventContext(block *types.Block) error + func (ds *DBSyncer) HandleChainEventParallel(block *types.Block) error + func (ds *DBSyncer) HandleDiffBlock(block *types.Block) + func (ds *DBSyncer) HandleLogsEvent(logs []*types.Log) error + func (ds *DBSyncer) Ping() + func (ds *DBSyncer) Protocols() []p2p.Protocol + func (ds *DBSyncer) SetComponents(components []interface{}) + func (ds *DBSyncer) Start(server p2p.Server) error + func (ds *DBSyncer) Stop() error + func (ds *DBSyncer) SyncTransactions(block *types.Block) error + type MakeQueryRequest struct + type MakeQueryResult struct + type QueryEngine struct + type SummaryArguments struct + type TxMapArguments struct + type TxReceiptArgument struct