Documentation
¶
Index ¶
- func StreamChanges(ctx context.Context, changeProcessor ChangeProcessor, ...) error
- func StreamLedgerTransactions(ctx context.Context, txProcessor LedgerTransactionProcessor, ...) error
- type AccountDataProcessor
- type AccountsProcessor
- type AssetStatSet
- func (s AssetStatSet) AddClaimableBalance(change ingest.Change) error
- func (s AssetStatSet) AddTrustline(change ingest.Change) error
- func (s AssetStatSet) All() []history.ExpAssetStat
- func (s AssetStatSet) Remove(assetType xdr.AssetType, assetCode string, assetIssuer string) (history.ExpAssetStat, bool)
- type AssetStatsProcessor
- type ChangeProcessor
- type ClaimableBalancesChangeProcessor
- type ClaimableBalancesTransactionProcessor
- type EffectProcessor
- type LedgerTransactionProcessor
- type LedgersProcessor
- type MockChangeProcessor
- type OffersProcessor
- type OperationProcessor
- type ParticipantsProcessor
- type SignersProcessor
- type StatsLedgerTransactionProcessor
- type StatsLedgerTransactionProcessorResults
- type TradeProcessor
- type TransactionProcessor
- type TrustLinesProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamChanges ¶
func StreamChanges( ctx context.Context, changeProcessor ChangeProcessor, reader ingest.ChangeReader, ) error
func StreamLedgerTransactions ¶
func StreamLedgerTransactions( ctx context.Context, txProcessor LedgerTransactionProcessor, reader *ingest.LedgerTransactionReader, ) error
Types ¶
type AccountDataProcessor ¶
type AccountDataProcessor struct {
// contains filtered or unexported fields
}
func NewAccountDataProcessor ¶
func NewAccountDataProcessor(dataQ history.QData) *AccountDataProcessor
func (*AccountDataProcessor) Commit ¶
func (p *AccountDataProcessor) Commit(ctx context.Context) error
func (*AccountDataProcessor) ProcessChange ¶
type AccountsProcessor ¶
type AccountsProcessor struct {
// contains filtered or unexported fields
}
func NewAccountsProcessor ¶
func NewAccountsProcessor(accountsQ history.QAccounts) *AccountsProcessor
func (*AccountsProcessor) ProcessChange ¶
type AssetStatSet ¶
type AssetStatSet map[assetStatKey]*assetStatValue
AssetStatSet represents a collection of asset stats
func (AssetStatSet) AddClaimableBalance ¶
func (s AssetStatSet) AddClaimableBalance(change ingest.Change) error
AddClaimableBalance updates the set to account for how a given claimable balance has changed. change must be a xdr.LedgerEntryTypeClaimableBalance type.
func (AssetStatSet) AddTrustline ¶
func (s AssetStatSet) AddTrustline(change ingest.Change) error
AddTrustline updates the set to account for how a given trustline has changed. change must be a xdr.LedgerEntryTypeTrustLine type.
func (AssetStatSet) All ¶
func (s AssetStatSet) All() []history.ExpAssetStat
All returns a list of all `history.ExpAssetStat` contained within the set
func (AssetStatSet) Remove ¶
func (s AssetStatSet) Remove(assetType xdr.AssetType, assetCode string, assetIssuer string) (history.ExpAssetStat, bool)
Remove deletes an asset stat from the set
type AssetStatsProcessor ¶
type AssetStatsProcessor struct {
// contains filtered or unexported fields
}
func NewAssetStatsProcessor ¶
func NewAssetStatsProcessor( assetStatsQ history.QAssetStats, useLedgerEntryCache bool, ) *AssetStatsProcessor
NewAssetStatsProcessor constructs a new AssetStatsProcessor instance. If useLedgerEntryCache is false we don't use ledger cache and we just add trust lines to assetStatSet, then we insert all the stats in one insert query. This is done to make history buckets processing faster (batch inserting).
func (*AssetStatsProcessor) Commit ¶
func (p *AssetStatsProcessor) Commit(ctx context.Context) error
func (*AssetStatsProcessor) ProcessChange ¶
type ChangeProcessor ¶
type ClaimableBalancesChangeProcessor ¶
type ClaimableBalancesChangeProcessor struct {
// contains filtered or unexported fields
}
func NewClaimableBalancesChangeProcessor ¶
func NewClaimableBalancesChangeProcessor(Q history.QClaimableBalances) *ClaimableBalancesChangeProcessor
func (*ClaimableBalancesChangeProcessor) Commit ¶
func (p *ClaimableBalancesChangeProcessor) Commit(ctx context.Context) error
func (*ClaimableBalancesChangeProcessor) ProcessChange ¶
type ClaimableBalancesTransactionProcessor ¶
type ClaimableBalancesTransactionProcessor struct {
// contains filtered or unexported fields
}
func NewClaimableBalancesTransactionProcessor ¶
func NewClaimableBalancesTransactionProcessor(Q history.QHistoryClaimableBalances, sequence uint32) *ClaimableBalancesTransactionProcessor
func (*ClaimableBalancesTransactionProcessor) Commit ¶
func (p *ClaimableBalancesTransactionProcessor) Commit(ctx context.Context) error
func (*ClaimableBalancesTransactionProcessor) ProcessTransaction ¶
func (p *ClaimableBalancesTransactionProcessor) ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) error
type EffectProcessor ¶
type EffectProcessor struct {
// contains filtered or unexported fields
}
EffectProcessor process effects
func NewEffectProcessor ¶
func NewEffectProcessor(effectsQ history.QEffects, sequence uint32) *EffectProcessor
func (*EffectProcessor) ProcessTransaction ¶
func (p *EffectProcessor) ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) (err error)
type LedgerTransactionProcessor ¶
type LedgerTransactionProcessor interface {
ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) error
}
type LedgersProcessor ¶
type LedgersProcessor struct {
// contains filtered or unexported fields
}
func NewLedgerProcessor ¶
func NewLedgerProcessor( ledgerQ history.QLedgers, ledger xdr.LedgerHeaderHistoryEntry, ingestVersion int, ) *LedgersProcessor
func (*LedgersProcessor) ProcessTransaction ¶
func (p *LedgersProcessor) ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) (err error)
type MockChangeProcessor ¶
func (*MockChangeProcessor) ProcessChange ¶
type OffersProcessor ¶
type OffersProcessor struct {
// contains filtered or unexported fields
}
func NewOffersProcessor ¶
func NewOffersProcessor(offersQ history.QOffers, sequence uint32) *OffersProcessor
func (*OffersProcessor) ProcessChange ¶
type OperationProcessor ¶
type OperationProcessor struct {
// contains filtered or unexported fields
}
OperationProcessor operations processor
func NewOperationProcessor ¶
func NewOperationProcessor(operationsQ history.QOperations, sequence uint32) *OperationProcessor
func (*OperationProcessor) ProcessTransaction ¶
func (p *OperationProcessor) ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) error
ProcessTransaction process the given transaction
type ParticipantsProcessor ¶
type ParticipantsProcessor struct {
// contains filtered or unexported fields
}
ParticipantsProcessor is a processor which ingests various participants from different sources (transactions, operations, etc)
func NewParticipantsProcessor ¶
func NewParticipantsProcessor(participantsQ history.QParticipants, sequence uint32) *ParticipantsProcessor
func (*ParticipantsProcessor) Commit ¶
func (p *ParticipantsProcessor) Commit(ctx context.Context) (err error)
func (*ParticipantsProcessor) ProcessTransaction ¶
func (p *ParticipantsProcessor) ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) (err error)
type SignersProcessor ¶
type SignersProcessor struct {
// contains filtered or unexported fields
}
func NewSignersProcessor ¶
func NewSignersProcessor( signersQ history.QSigners, useLedgerEntryCache bool, ) *SignersProcessor
func (*SignersProcessor) ProcessChange ¶
type StatsLedgerTransactionProcessor ¶
type StatsLedgerTransactionProcessor struct {
// contains filtered or unexported fields
}
StatsLedgerTransactionProcessor is a state processors that counts number of changes types and entry types.
func (*StatsLedgerTransactionProcessor) GetResults ¶
func (p *StatsLedgerTransactionProcessor) GetResults() StatsLedgerTransactionProcessorResults
func (*StatsLedgerTransactionProcessor) ProcessTransaction ¶
func (p *StatsLedgerTransactionProcessor) ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) error
type StatsLedgerTransactionProcessorResults ¶
type StatsLedgerTransactionProcessorResults struct { Transactions int64 TransactionsSuccessful int64 TransactionsFailed int64 Operations int64 OperationsInSuccessful int64 OperationsInFailed int64 OperationsCreateAccount int64 OperationsPayment int64 OperationsPathPaymentStrictReceive int64 OperationsManageSellOffer int64 OperationsCreatePassiveSellOffer int64 OperationsSetOptions int64 OperationsChangeTrust int64 OperationsAllowTrust int64 OperationsAccountMerge int64 OperationsInflation int64 OperationsManageData int64 OperationsBumpSequence int64 OperationsManageBuyOffer int64 OperationsPathPaymentStrictSend int64 OperationsCreateClaimableBalance int64 OperationsClaimClaimableBalance int64 OperationsBeginSponsoringFutureReserves int64 OperationsEndSponsoringFutureReserves int64 OperationsRevokeSponsorship int64 OperationsClawback int64 OperationsClawbackClaimableBalance int64 OperationsSetTrustLineFlags int64 }
StatsLedgerTransactionProcessorResults contains results after running StatsLedgerTransactionProcessor.
func (*StatsLedgerTransactionProcessorResults) Map ¶
func (stats *StatsLedgerTransactionProcessorResults) Map() map[string]interface{}
type TradeProcessor ¶
type TradeProcessor struct {
// contains filtered or unexported fields
}
TradeProcessor operations processor
func NewTradeProcessor ¶
func NewTradeProcessor(tradesQ history.QTrades, ledger xdr.LedgerHeaderHistoryEntry) *TradeProcessor
func (*TradeProcessor) ProcessTransaction ¶
func (p *TradeProcessor) ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) (err error)
ProcessTransaction process the given transaction
type TransactionProcessor ¶
type TransactionProcessor struct {
// contains filtered or unexported fields
}
func NewTransactionProcessor ¶
func NewTransactionProcessor(transactionsQ history.QTransactions, sequence uint32) *TransactionProcessor
func (*TransactionProcessor) Commit ¶
func (p *TransactionProcessor) Commit(ctx context.Context) error
func (*TransactionProcessor) ProcessTransaction ¶
func (p *TransactionProcessor) ProcessTransaction(ctx context.Context, transaction ingest.LedgerTransaction) error
type TrustLinesProcessor ¶
type TrustLinesProcessor struct {
// contains filtered or unexported fields
}
func NewTrustLinesProcessor ¶
func NewTrustLinesProcessor(trustLinesQ history.QTrustLines) *TrustLinesProcessor
func (*TrustLinesProcessor) Commit ¶
func (p *TrustLinesProcessor) Commit(ctx context.Context) error
func (*TrustLinesProcessor) ProcessChange ¶
Source Files
¶
- account_data_processor.go
- accounts_processor.go
- asset_stats_processor.go
- asset_stats_set.go
- change_processors.go
- claimable_balances_change_processor.go
- claimable_balances_transaction_processor.go
- effects_processor.go
- ledgers_processor.go
- main.go
- mock_change_processor.go
- offers_processor.go
- operations_processor.go
- participants_processor.go
- signers_processor.go
- stats_ledger_transaction_processor.go
- trades_processor.go
- transactions_processor.go
- trust_lines_processor.go