Documentation ¶
Overview ¶
Package config allows you to pass in a custom config for which rpcs to hit
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainConfig ¶
type ChainConfig struct { // RPCS is a list of rpcs to use RPCs []string `yaml:"rpcs"` // Checks is how many rpcs must return the same result for it to be used. This does not apply to height/status based methods Checks uint16 `yaml:"confirmations,omitempty"` }
ChainConfig is the config for a single chain.
type Config ¶
type Config struct { // chainID -> chainConfig Chains map[uint32]ChainConfig `yaml:"chains"` // Port is the port Port uint16 `yaml:"port,omitempty"` // RefreshInterval is the refresh interval of rpc latency // expressed in seconds RefreshInterval int `yaml:"refresh_interval,omitempty"` // ClientType is the client type to use ClientType string `yaml:"client_type,omitempty"` }
Config holds the config for the chain.
func GetPublicRPCConfig ¶
GetPublicRPCConfig gets the rpc map. This should be done at startup time.
func UnmarshallConfig ¶
UnmarshallConfig unmarshalls a config.
Click to show internal directories.
Click to hide internal directories.