processors

package
v0.0.0-...-c9303cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IngestUpdateDatabase = PipelineContextKey("IngestUpdateDatabase")
)

Variables

This section is empty.

Functions

This section is empty.

Types

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 {
	HistoryQ history.QSigners
	OffersQ  history.QOffers
	Action   DatabaseProcessorActionType
}

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) 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 (
	AccountsForSigner DatabaseProcessorActionType = "AccountsForSigner"
	Offers            DatabaseProcessorActionType = "Offers"
)

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) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL