Documentation ¶
Index ¶
- Constants
- type AssetStatSet
- func (s AssetStatSet) Add(trustLine xdr.TrustLineEntry) error
- func (s AssetStatSet) AddDelta(asset xdr.Asset, deltaBalance int64, deltaAccounts int32) error
- func (s AssetStatSet) All() []history.ExpAssetStat
- func (s AssetStatSet) Remove(assetType xdr.AssetType, assetCode string, assetIssuer string) (history.ExpAssetStat, bool)
- type ContextFilter
- func (p *ContextFilter) Name() string
- func (p *ContextFilter) ProcessLedger(ctx context.Context, store *pipeline.Store, r io.LedgerReader, ...) error
- func (p *ContextFilter) ProcessState(ctx context.Context, store *pipeline.Store, r io.StateReader, w io.StateWriter) error
- func (p *ContextFilter) Reset()
- type DatabaseProcessor
- func (p *DatabaseProcessor) Name() string
- func (p *DatabaseProcessor) ProcessLedger(ctx context.Context, store *pipeline.Store, r io.LedgerReader, ...) (err error)
- func (p *DatabaseProcessor) ProcessState(ctx context.Context, store *pipeline.Store, r io.StateReader, w io.StateWriter) error
- func (p *DatabaseProcessor) Reset()
- type DatabaseProcessorActionType
- type OrderbookProcessor
- func (p *OrderbookProcessor) Name() string
- func (p *OrderbookProcessor) ProcessLedger(ctx context.Context, store *pipeline.Store, r io.LedgerReader, ...) (err error)
- func (p *OrderbookProcessor) ProcessState(ctx context.Context, store *pipeline.Store, r io.StateReader, w io.StateWriter) error
- func (p *OrderbookProcessor) Reset()
- type PipelineContextKey
Constants ¶
const (
IngestUpdateDatabase = PipelineContextKey("IngestUpdateDatabase")
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetStatSet ¶
type AssetStatSet map[assetStatKey]*assetStatValue
AssetStatSet represents a collection of asset stats
func (AssetStatSet) Add ¶
func (s AssetStatSet) Add(trustLine xdr.TrustLineEntry) error
Add updates the set with a trustline entry from a history archive snapshot if the trustline is authorized.
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 ContextFilter ¶
type ContextFilter struct {
Key PipelineContextKey
}
ContextFilter writes read objects only if a given key is present in the pipline context.
func (*ContextFilter) Name ¶
func (p *ContextFilter) Name() string
func (*ContextFilter) ProcessLedger ¶
func (p *ContextFilter) ProcessLedger(ctx context.Context, store *pipeline.Store, r io.LedgerReader, w io.LedgerWriter) error
func (*ContextFilter) ProcessState ¶
func (p *ContextFilter) ProcessState(ctx context.Context, store *pipeline.Store, r io.StateReader, w io.StateWriter) error
func (*ContextFilter) Reset ¶
func (p *ContextFilter) Reset()
type DatabaseProcessor ¶
type DatabaseProcessor struct { AccountsQ history.QAccounts DataQ history.QData SignersQ history.QSigners OffersQ history.QOffers TrustLinesQ history.QTrustLines AssetStatsQ history.QAssetStats LedgersQ history.QExpLedgers Action DatabaseProcessorActionType IngestVersion int // AssetStatSet is used in TrustLines processor AssetStatSet AssetStatSet }
DatabaseProcessor is a processor (both state and ledger) that's responsible for persisting ledger data used in expingest in a database. It's possible to create multiple procesors of this type but they all should share the same *history.Q object to share a common transaction. `Action` defines what each processor is responsible for.
func (*DatabaseProcessor) Name ¶
func (p *DatabaseProcessor) Name() string
func (*DatabaseProcessor) ProcessLedger ¶
func (p *DatabaseProcessor) ProcessLedger(ctx context.Context, store *pipeline.Store, r io.LedgerReader, w io.LedgerWriter) (err error)
func (*DatabaseProcessor) ProcessState ¶
func (p *DatabaseProcessor) ProcessState(ctx context.Context, store *pipeline.Store, r io.StateReader, w io.StateWriter) error
func (*DatabaseProcessor) Reset ¶
func (p *DatabaseProcessor) Reset()
type DatabaseProcessorActionType ¶
type DatabaseProcessorActionType string
const ( Accounts DatabaseProcessorActionType = "Accounts" AccountsForSigner DatabaseProcessorActionType = "AccountsForSigner" Data DatabaseProcessorActionType = "Data" Offers DatabaseProcessorActionType = "Offers" TrustLines DatabaseProcessorActionType = "TrustLines" Ledgers DatabaseProcessorActionType = "Ledgers" All DatabaseProcessorActionType = "All" )
type OrderbookProcessor ¶
type OrderbookProcessor struct {
OrderBookGraph *orderbook.OrderBookGraph
}
OrderbookProcessor is a processor (both state and ledger) that's responsible for updating orderbook graph with new/updated/removed offers. Orderbook graph can be later used for path finding.
func (*OrderbookProcessor) Name ¶
func (p *OrderbookProcessor) Name() string
func (*OrderbookProcessor) ProcessLedger ¶
func (p *OrderbookProcessor) ProcessLedger(ctx context.Context, store *pipeline.Store, r io.LedgerReader, w io.LedgerWriter) (err error)
func (*OrderbookProcessor) ProcessState ¶
func (p *OrderbookProcessor) ProcessState(ctx context.Context, store *pipeline.Store, r io.StateReader, w io.StateWriter) error
func (*OrderbookProcessor) Reset ¶
func (p *OrderbookProcessor) Reset()
type PipelineContextKey ¶
type PipelineContextKey string