query

package
v0.0.0-...-23cc077 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeJsonRpcQueryWithRetry

func BeJsonRpcQueryWithRetry[T any](
	qSvc BeJsonRpcQueryService,
	f func(BeJsonRpcQueryService) (T, time.Duration, error),
	retryOption ...querytypes.RetryOption,
) (res T, duration time.Duration, err error)

Types

type BeJsonRpcQueryService

type BeJsonRpcQueryService interface {
	SetQueryEndpoint(url string)

	GetQueryEndpoint() string

	// BeGetChainInfo is `be_getChainInfo`
	BeGetChainInfo() (res *querytypes.ResponseBeGetChainInfo, duration time.Duration, err error)

	// BeGetLatestBlockNumber is `be_getLatestBlockNumber`
	BeGetLatestBlockNumber() (res *querytypes.ResponseBeGetLatestBlockNumber, duration time.Duration, err error)

	// BeTransactionsInBlockRange is `be_getTransactionsInBlockRange`
	BeTransactionsInBlockRange(from, to int64) (res *querytypes.TransformedResponseBeTransactionsInBlockRange, duration time.Duration, err error)
}

func NewBeJsonRpcQueryService

func NewBeJsonRpcQueryService(chainId string, logger logging.Logger) BeJsonRpcQueryService

NewBeJsonRpcQueryService initialize and returns a BeJsonRpcQueryService instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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