rpc

package
v0.0.71 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBackoffDurationForAttempts

func GetBackoffDurationForAttempts(numAttempts int64, maxRetryTime time.Duration) (time.Duration, bool)

func GetBlockResult

func GetBlockResult(client URIClient, height int64) (*ctypes.ResultBlockResults, error)

func GetBlockResultWithRetry

func GetBlockResultWithRetry(client URIClient, height int64, retryMaxAttempts int64, retryMaxWaitSeconds uint64) (*ctypes.ResultBlockResults, error)

Types

type URIClient

type URIClient struct {
	Address    string
	Client     *http.Client
	AuthHeader string
}

func (*URIClient) DoBlockResults

func (c *URIClient) DoBlockResults(ctx context.Context, height *int64) (*ctypes.ResultBlockResults, error)

func (*URIClient) DoBlockSearch

func (c *URIClient) DoBlockSearch(ctx context.Context, query string, page, perPage *int, orderBy string) (*ctypes.ResultBlockSearch, error)

func (*URIClient) DoHTTPGet

func (c *URIClient) DoHTTPGet(ctx context.Context, method string, params map[string]interface{}, result interface{}) (interface{}, error)

Jump to

Keyboard shortcuts

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