service

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 15 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

type QueryProcessorService added in v0.1.10

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

func NewQueryProcessor added in v0.1.10

func NewQueryProcessor(queryService domain.QueryService, repo domain.QueryResultRepositoryInterface) (*QueryProcessorService, error)

func (*QueryProcessorService) GetMaxTopicID added in v0.1.10

func (q *QueryProcessorService) GetMaxTopicID(ctx context.Context) (uint64, error)

func (*QueryProcessorService) ProcessEmissionInfo added in v0.1.10

func (q *QueryProcessorService) ProcessEmissionInfo(ctx context.Context) error

func (*QueryProcessorService) ProcessInflation added in v0.1.10

func (q *QueryProcessorService) ProcessInflation(ctx context.Context) error

func (*QueryProcessorService) ProcessNaiveInfererNetworkRegret added in v0.1.10

func (q *QueryProcessorService) ProcessNaiveInfererNetworkRegret(ctx context.Context, topicID uint64) error

func (*QueryProcessorService) ProcessNetworkInferences added in v0.1.10

func (q *QueryProcessorService) ProcessNetworkInferences(ctx context.Context, topicID uint64) error

type QueryService added in v0.1.10

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

func NewQueryService added in v0.1.10

func NewQueryService(alloraClient domain.AlloraClientInterface, codec domain.CodecInterface) (*QueryService, error)

func (*QueryService) GetEmissionInfo added in v0.1.10

func (q *QueryService) GetEmissionInfo(ctx context.Context) (*domain.QueryResult, error)

func (*QueryService) GetInflation added in v0.1.10

func (q *QueryService) GetInflation(ctx context.Context) (*domain.QueryResult, error)

func (*QueryService) GetLatestNetworkInferences added in v0.1.10

func (q *QueryService) GetLatestNetworkInferences(ctx context.Context, topicID uint64) (*domain.QueryResult, error)

func (*QueryService) GetNaiveInfererNetworkRegret added in v0.1.10

func (q *QueryService) GetNaiveInfererNetworkRegret(ctx context.Context, topicID uint64) (*domain.QueryResult, error)

func (*QueryService) GetNextTopicID added in v0.1.10

func (q *QueryService) GetNextTopicID(ctx context.Context) (uint64, error)

func (*QueryService) Query added in v0.1.10

func (q *QueryService) Query(ctx context.Context, path string, in proto.Message, out proto.Message) (int64, error)

func (*QueryService) QueryJSON added in v0.1.10

func (q *QueryService) QueryJSON(ctx context.Context, path string, in proto.Message, out proto.Message) (*domain.QueryResult, error)

Jump to

Keyboard shortcuts

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