p2p

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoRelayFeeder

func AutoRelayFeeder(ctx context.Context, h host.Host, dht *dualdht.DHT, trustedPeer []peer.AddrInfo, peerChan chan<- peer.AddrInfo)

func EnableAutoRelay

func EnableAutoRelay(peerChan chan peer.AddrInfo) libp2p.Option

func RecordValidator

func RecordValidator(ps peerstore.Peerstore) record.Validator

RecordValidator provides namesys compatible routing record validator

func StaticRelay

func StaticRelay(staticRelays []string) libp2p.Option

Types

type LocalNode

type LocalNode struct {
	Host        host.Host
	KadDHT      *dht.IpfsDHT
	DualDht     *dualdht.DHT
	PingService *ping.PingService
}

func NewLocalNode

func NewLocalNode(ctx context.Context, priv crypto.PrivKey, p2pPort int) (*LocalNode, error)

func (*LocalNode) Trace

func (n *LocalNode) Trace(evt *holepunch.Event)

Jump to

Keyboard shortcuts

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