Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDht ¶
func NewDht(ctxBackground context.Context, host host.Host, bootPeers []peer.AddrInfo, instance *state.State, transactionData *bind.TransactOpts, conf *configuration.Configuration) *discovery.RoutingDiscovery
* Description: Create a RoutingDiscovery struct populated with values needed to create a * DHT routing table that can be used for discovery. * Byt first creatin a new data store to hold values for the DHT router * and then set the options to bootnode, the database, bootpeers, protocol prefix to make it uniqe * and a function to handle if the DHT routing table it empty. * Also DisableProviders it set since it wont need to use Internet connected bootstrap nodes. * Then it creates the routing table and activates it. * @dev Return a RoutingDiscovery struct which is a DHT bootnode routing table. * @return value of 'RoutingDiscovery struct'
func NewHost ¶
* Description: Creates a host with a seed to generate a key * that listens on the port specfified with the TCp protocol * on a generated multi address using the noise portocol for security * and default resrouce manager. * @dev Return a Host struct and nill if success or an error message on failure. * @return value of 'Host struct and error'
Types ¶
This section is empty.