Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClientURLNotSet error = errors.New("configuration client URL not set") ErrConcurrentClientsNotSet error = errors.New("configuration amount of concurrent clients is not set") )
Error messages
Functions ¶
This section is empty.
Types ¶
type EthClient ¶
type EthClient struct {
// contains filtered or unexported fields
}
EthClient represents a load-balanced Ethereum client. It maintains a list of underlying Ethereum clients and provides methods to interact with the Ethereum network.
func NewEthClients ¶
NewEthClient creates a new EthClient with the given context and options. It concurrently dials the specified number of Ethereum clients and returns an EthClient that load balances requests among them. If any error occurs during the dialing of the Ethereum clients, it is returned.
func (*EthClient) Close ¶
func (c *EthClient) Close()
Close closes all the underlying Ethereum clients.
func (*EthClient) GetNetworkID ¶
GetNetworkID retrieves the network ID from one of the underlying Ethereum clients.
Click to show internal directories.
Click to hide internal directories.