Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricReceiveMessages = "receive_messages" MetricParseDataError = "parse_data_error" MetricVaildationSuccess = "validation_success" MetricVaildationError = "validation_error" MetricDatabaseRollback = "database_rollback" MetricDatabaseCommit = "database_commit" MetricCronWorkerJob = "cron_worker_job" MetricCronWorkerJobUpdateMetaData = "cron_worker_job_update_meta_data" MetricCronWorkerJobRefreshContractAddresses = "cron_worker_job_refresh_contract_addresses" MetricCronWorkerJobRefreshPoolName = "cron_worker_job_refresh_pool_name" MetricRPCCall = "rpc_call" MetricRevertBlock = "revert_block" TimeYmdHmssFormatISO = "2006-01-02T15:04:05.000" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CronWorker ¶
type CronWorker struct {
// contains filtered or unexported fields
}
func NewCronWorker ¶
func NewCronWorker(splitter *EOSSplitter) *CronWorker
func (*CronWorker) Prepare ¶
func (w *CronWorker) Prepare() error
func (*CronWorker) Start ¶
func (w *CronWorker) Start() error
func (*CronWorker) Stop ¶
func (w *CronWorker) Stop()
type EOSBlockData ¶
type EOSBlockData struct { Block *model.Block Transactions []*model.Transaction Actions []*model.Action }
func ParseBlock ¶
func ParseBlock(data string) (*EOSBlockData, error)
type EOSSplitter ¶
type EOSSplitter struct {
// contains filtered or unexported fields
}
func NewSplitter ¶
func NewSplitter(cfg *SplitterConfig) (*EOSSplitter, error)
func (*EOSSplitter) CheckBlock ¶
func (s *EOSSplitter) CheckBlock(curBlock *EOSBlockData) bool
func (*EOSSplitter) RevertBlock ¶
func (s *EOSSplitter) RevertBlock(num int64, tx *service.Transaction) error
func (*EOSSplitter) Start ¶
func (s *EOSSplitter) Start()
func (*EOSSplitter) Stop ¶
func (s *EOSSplitter) Stop()
type SplitterConfig ¶
type SplitterConfig struct { Engine *xorm.Engine Consumer *kafka.ConsumerGroup Topic string DatabaseEnable bool DatabaseWorkerBuffer int DatabaseWorkerNumber int SkipHeight int SkipMissBlock bool MaxBatchBlock int Endpoint string KafkaProxyHost string KafkaProxyPort string User string Password string JSONSchemaFile string JSONSchemaValidationEnable bool }
Click to show internal directories.
Click to hide internal directories.