Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoHealthyNodesFound = errors.New("healthy node was not found")
)
View Source
var (
ErrorNoSpecifiedNodesFound = errors.New("no specified nodes found")
)
Functions ¶
This section is empty.
Types ¶
type MultiChainNodesStorage ¶
type MultiChainNodesStorage interface { GetByChainId(chainId int64) (*Node, error) GetNextByChainId(chainId int64) (*Node, error) GetHistoryByChainId(chainId int64) (*Node, error) GetNextHistoryByChainId(chainId int64) (*Node, error) ToSingleChain(chainId int64) (NodesStorage, error) }
func NewInmemoryMultiChainNodesStorage ¶
func NewInmemoryMultiChainNodesStorage(cfg NodesConfig) MultiChainNodesStorage
type Node ¶
type Node struct { Rpc *ethclient.Client `fig:"rpc,required"` RpcUrl string `fig:"rpc,required"` Ws *ethclient.Client `fig:"ws"` WsUrl string `fig:"ws"` ChainId int64 `fig:"chain_id,required"` History bool `fig:"history"` }
func (Node) CheckHealth ¶
CheckHealth tries to get currentF block number and if it fails, returns false (and true otherwise, respectively)
type Noder ¶
type Noder interface { NodesConfig() NodesConfig MultiChainNodesStorage() MultiChainNodesStorage NodesStorage() NodesStorage }
type NodesConfig ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.