rpcinfo

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package rpcinfo provides latency detection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// URL is the url of the latency being tested
	URL string
	// Latency is the latency time in seconds
	Latency time.Duration
	// BlockAge is the age of the block
	BlockAge time.Duration
	// BlockNumber is the block number
	BlockNumber uint64
	// HasError is wether or not the result has an error
	HasError bool
	// Error is the error recevied when trying to establish latency
	Error error
}

Result is the result of a latency check on a url.

func GetRPCLatency

func GetRPCLatency(parentCtx context.Context, timeout time.Duration, rpcList []string, handler metrics.Handler) (latSlice []Result)

GetRPCLatency gets latency from a list of rpcs.

Jump to

Keyboard shortcuts

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