Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetMetrics() (*Metrics, error) GetConfigHash() (hash.Hash32, error) GetRPCURL() string GetMetricsURL() string }
Client is used to interact with polkadot node
type MethodsResult ¶
MethodsResult contains all available rpc methods of node
type Metrics ¶
type Metrics struct { PeerCount *float64 `json:"peer_count"` BestBlockHeight *float64 `json:"best_block_height"` FinalizedBlockHeight *float64 `json:"finalized_block_height"` ReadyTransactionCount *float64 `json:"ready_transaction_count"` }
Metrics required to be sent to load balancer
type Properties ¶
type Properties struct { SS58Format int `json:"ss58Format"` TokenDecimals int `json:"tokenDecimals"` TokenSymbol string `json:"tokenSymbol"` }
Properties are node properties
type RPCRequest ¶
type RPCRequest struct { ID int `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params []string `json:"params"` }
RPCRequest is used for retrieving data from node
type RPCResponse ¶
type RPCResponse struct { JSONRPC string `json:"jsonrpc"` Error RPCError `json:"error"` ID int `json:"id"` Result interface{} `json:"result"` }
RPCResponse is response from rpc request
Click to show internal directories.
Click to hide internal directories.