Documentation ¶
Overview ¶
Package chainmanager manages contexts about multiple chains
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain interface { // ConfirmationsThreshold gets the confirmation count ConfirmationsThreshold() uint16 // URLs gets the urls URLs() []string // ID returns the id of the chain ID() uint32 }
Chain contains the context for a single chain.
type ChainManager ¶
type ChainManager interface { // GetChainIDs gets all chainids GetChainIDs() (chainIDs []uint32) // RefreshRPCInfo refreshes rpc info for a chain id RefreshRPCInfo(ctx context.Context, chainID uint32) // GetChain gets the chain GetChain(chainID uint32) Chain // PutChain adds chain urls. Any previous chain data is overwritten PutChain(chainID uint32, urls []string, confirmations uint16) }
ChainManager manages chain context.
func NewChainManager ¶
func NewChainManager() ChainManager
NewChainManager creates a new chain manager.
func NewChainManagerFromConfig ¶
func NewChainManagerFromConfig(configuration config.Config) ChainManager
NewChainManagerFromConfig creates a new chain manager.
Click to show internal directories.
Click to hide internal directories.