service

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmissionsServicePrefix = "/emissions.v7.QueryService/"
	MintServicePrefix      = "/mint.v5.QueryService/"
)

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 HTTPClient added in v0.1.22

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

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, topicMetrics []config.TopicMetricConfig) (*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) ProcessGroundTruthData added in v0.1.14

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

func (*QueryProcessorService) ProcessInflation added in v0.1.10

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

func (*QueryProcessorService) ProcessLatestAvailableNetworkInferencesOutlierResistant added in v0.1.20

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

func (*QueryProcessorService) ProcessLatestNetworkInferencesOutlierResistant added in v0.1.20

func (q *QueryProcessorService) ProcessLatestNetworkInferencesOutlierResistant(ctx context.Context, topicID uint64) 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

func (*QueryProcessorService) ProcessReputerStakes added in v0.1.15

func (q *QueryProcessorService) ProcessReputerStakes(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, alloraAPIURL string, alloraAPIKey string) (*QueryService, error)

func (*QueryService) GetActiveReputers added in v0.1.15

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) GetLatestAvailableNetworkInferencesOutlierResistant added in v0.1.20

func (q *QueryService) GetLatestAvailableNetworkInferencesOutlierResistant(ctx context.Context, topicID uint64) (*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) GetLatestNetworkInferencesOutlierResistant added in v0.1.20

func (q *QueryService) GetLatestNetworkInferencesOutlierResistant(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) GetOHLCData added in v0.1.14

func (q *QueryService) GetOHLCData(ctx context.Context, ticker string, fromDate string) (domain.OHLCResponse, error)

func (*QueryService) GetReputerStake added in v0.1.15

func (q *QueryService) GetReputerStake(ctx context.Context, reputerAddr string, topicID uint64) (math.Int, 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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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