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" MetricCronWorkerJobGetBatchBlock = "cron_worker_job_get_batch_block" MetricCronWorkerJobRefreshContractAddresses = "cron_worker_job_refresh_contract_addresses" MetricCronWorkerJobRefreshPoolName = "cron_worker_job_refresh_pool_name" MetricRPCCall = "rpc_call" MetricRevertBlock = "revert_block" AccountTypeNormal = 0 AccountTypeContract = 1 AccountTypeMiner = 2 TransactionTypeNormal = 0 TransactionTypeContract = 1 )
Variables ¶
This section is empty.
Functions ¶
func FormatAmount ¶
func FormatAmount(transaction *model.Transaction, input string) *model.Amount
Types ¶
type CompleteLedgers ¶
type CompleteLedgers struct {
// contains filtered or unexported fields
}
type CronWorker ¶
type CronWorker struct {
// contains filtered or unexported fields
}
func NewCronWorker ¶
func NewCronWorker(splitter *XRPSplitter) *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 SplitterConfig ¶
type WorkerJob ¶
type WorkerJob interface { Run() Name() string // contains filtered or unexported methods }
type XRPBlockData ¶
type XRPBlockData struct { Block *model.Block Transactions []*model.Transaction Accounts []*model.Account AffectedNodes []*model.AffectedNodes Paths []*model.Path Amounts []*model.Amount }
func ParseBlock ¶
func ParseBlock(data string) (*XRPBlockData, error)
type XRPSplitter ¶
type XRPSplitter struct {
// contains filtered or unexported fields
}
func NewSplitter ¶
func NewSplitter(cfg *SplitterConfig) (*XRPSplitter, error)
func (*XRPSplitter) CheckBlock ¶
func (s *XRPSplitter) CheckBlock(curBlock *XRPBlockData) (bool, int64)
func (*XRPSplitter) CheckMissedBlock ¶
func (s *XRPSplitter) CheckMissedBlock() ([]int64, error)
func (*XRPSplitter) SaveBlock ¶
func (s *XRPSplitter) SaveBlock(data *XRPBlockData) error
func (*XRPSplitter) Start ¶
func (s *XRPSplitter) Start()
func (*XRPSplitter) Stop ¶
func (s *XRPSplitter) Stop()
Click to show internal directories.
Click to hide internal directories.