events

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// IngestionQueueName is the events ingestion queue name
	IngestionQueueName = "events-ingestion-queue"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	TransactionEvent *TransactionEvent `json:"transaction_event"`
}

Event is a top level event container for blockchain events.

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

Processor processes transactions as a history.Writer, and notifies webhooks about said transactions via a taskqueue.

func NewProcessor

func NewProcessor(
	eventsQueueCtor taskqueue.ProcessorCtor,
	invoiceStore invoice.Store,
	configStore app.ConfigStore,
	appMapper app.Mapper,
	webhookClient *webhook.Client,
) (p *Processor, err error)

func (*Processor) Submit added in v0.3.0

func (p *Processor) Submit(ctx context.Context, entry *model.Entry) error

Submit implements Submitter.Submit.

func (*Processor) Write

func (p *Processor) Write(ctx context.Context, entry *model.Entry) error

Write implements history.Writer.Write.

Write forwards model.Entry's to a taskqueue, where other processors will attempt to notify any webhooks that might be interested in the transaction.

type SolanaEvent added in v0.2.3

type SolanaEvent struct {
	Transaction         []byte `json:"transaction"`
	TransactionError    string `json:"transaction_error"`
	TransactionErrorRaw []byte `json:"transaction_error_raw"`
}

SolanaEvent is stellar specific data related to a transaction.

type StellarEvent added in v0.2.3

type StellarEvent struct {
	EnvelopeXDR []byte `json:"envelope_xdr"`
	ResultXDR   []byte `json:"result_xdr"`
}

StellarEvent is stellar specific data related to a transaction.

type Submitter added in v0.3.0

type Submitter interface {
	Submit(context.Context, *model.Entry) error
}

type TransactionEvent

type TransactionEvent struct {
	KinVersion  int                   `json:"kin_version"`
	TxHash      []byte                `json:"tx_hash"`
	TxID        []byte                `json:"tx_id"`
	InvoiceList *commonpb.InvoiceList `json:"invoice_list"`

	StellarEvent *StellarEvent `json:"stellar_event"`
	SolanaEvent  *SolanaEvent  `json:"solana_event"`
}

TransactionEvent is an event containing transaction details.

Jump to

Keyboard shortcuts

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