service

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParseTransaction = errors.New("failed to parse transaction")
)

Functions

This section is empty.

Types

type Filter

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

func NewFilter

func NewFilter(allowedTypes ...string) *Filter

func (*Filter) ShouldProcess

func (f *Filter) ShouldProcess(typeValue string) bool

type FilterEvent

type FilterEvent struct {
	Filter
}

FilterEvent filters events based on the allowed types.

func NewFilterEvent

func NewFilterEvent(allowedTypes ...string) *FilterEvent

NewFilterEvent creates a new FilterEvent.

func (*FilterEvent) ShouldProcess

func (f *FilterEvent) ShouldProcess(event *abci.Event) bool

type FilterTransactionMessage

type FilterTransactionMessage struct {
	Filter
}

FilterTransactionMessage filters transaction messages based on the allowed types.

func NewFilterTransactionMessage

func NewFilterTransactionMessage(allowedTypes ...string) *FilterTransactionMessage

NewFilterTransactionMessage creates a new FilterTransactionMessage.

func (*FilterTransactionMessage) ShouldProcess

func (f *FilterTransactionMessage) ShouldProcess(txMsg *codectypes.Any) bool

type ProcessorService

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

func NewProcessorService

func NewProcessorService(streamingClient domain.StreamingClient, codec domain.CodecInterface, filterEvent domain.FilterInterface[abci.Event],
	filterTransactionMessage domain.FilterInterface[codectypes.Any]) (*ProcessorService, error)

func (*ProcessorService) ProcessBlock

func (m *ProcessorService) ProcessBlock(ctx context.Context, block *coretypes.ResultBlock) error

ProcessBlock implements domain.ProcessorService.

func (*ProcessorService) ProcessBlockResults

func (m *ProcessorService) ProcessBlockResults(ctx context.Context, blockResults *coretypes.ResultBlockResults, header *types.Header) error

ProcessBlockResults implements domain.ProcessorService.

func (*ProcessorService) ProcessEvent

func (m *ProcessorService) ProcessEvent(ctx context.Context, event *abci.Event, header *types.Header) error

func (*ProcessorService) ProcessTransaction

func (m *ProcessorService) ProcessTransaction(ctx context.Context, tx []byte, txIndex int, header *types.Header) error

Jump to

Keyboard shortcuts

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