Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecNToFloat ¶
DecNToFloat converts a decimal N number to the corresponding float number
func IsValidEvmAddr ¶
Types ¶
type APIBalancesPayload ¶
type APIBalancesResponse ¶
type APIBalancesResponse struct {
Result []Balance `json:"Result"`
}
type Config ¶
type Config struct { ConfigFile PerpAddr common.Address `json:"perpAddr"` }
func LoadConfig ¶
type ConfigFile ¶
type FSPageStats ¶
type FSResultSet ¶
type RpcHandler ¶
type RpcHandler struct { RpcClients []*ethclient.Client Buckets map[*ethclient.Client]*TokenBucket // contains filtered or unexported fields }
func (*RpcHandler) GetNextRpc ¶
func (h *RpcHandler) GetNextRpc() *ethclient.Client
func (*RpcHandler) GetRpc ¶
func (h *RpcHandler) GetRpc() *ethclient.Client
func (*RpcHandler) Init ¶
func (h *RpcHandler) Init(rpcUrls []string, capacity int, refillRate float64) error
func (*RpcHandler) WaitForToken ¶
func (h *RpcHandler) WaitForToken(rpc *ethclient.Client)
type TokenBucket ¶
type TokenBucket struct {
// contains filtered or unexported fields
}
func NewTokenBucket ¶
func NewTokenBucket(capacity int, refillRate float64) *TokenBucket
func (*TokenBucket) Take ¶
func (tb *TokenBucket) Take() bool
func (*TokenBucket) WaitForToken ¶
func (tb *TokenBucket) WaitForToken(topic string, doLog bool)
Click to show internal directories.
Click to hide internal directories.