libp2putils

package
v0.0.0-...-6f32bdd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 19 Imported by: 1

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

func NewHost(seed int64, port int) (host.Host, error)

* 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL