host

package
v0.0.0-...-480b165 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DiscoveryInterval = time.Second * 10

DiscoveryInterval is how often we search for other peers via the DHT.

View Source
const DiscoveryServiceTag = "erebrus"

DiscoveryServiceTag is used in our DHT advertisements to discover other peers.

Variables

This section is empty.

Functions

func CreateHost

func CreateHost() host.Host

func Discover

func Discover(ctx context.Context, h host.Host, dht *dht.IpfsDHT)

func NewDHT

func NewDHT(ctx context.Context, host host.Host, bootstrapPeers []multiaddr.Multiaddr) (*dht.IpfsDHT, error)

NewDHT attempts to connect to a bunch of bootstrap peers and returns a new DHT. If you don't have any bootstrapPeers, you can use dht.DefaultBootstrapPeers or an empty list.

Types

This section is empty.

Jump to

Keyboard shortcuts

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