discovery

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrList

type AddrList []maddr.Multiaddr

A new type we need for writing a custom flag parser

func (*AddrList) Set

func (al *AddrList) Set(value string) error

func (*AddrList) String

func (al *AddrList) String() string

type DHT

type DHT struct {
	OTPKey           string
	OTPInterval      int
	KeyLength        int
	RendezvousString string
	BootstrapPeers   AddrList

	RefreshDiscoveryTime time.Duration
	*dht.IpfsDHT
	// contains filtered or unexported fields
}

func NewDHT added in v0.8.4

func NewDHT(d ...dht.Option) *DHT

func (*DHT) FindClosePeers added in v0.16.1

func (d *DHT) FindClosePeers(ll log.StandardLogger, onlyStaticRelays bool, static ...string) func(ctx context.Context, numPeers int) <-chan peer.AddrInfo

func (*DHT) Option

func (d *DHT) Option(ctx context.Context) func(c *libp2p.Config) error

func (*DHT) Rendezvous

func (d *DHT) Rendezvous() string

func (*DHT) Run

func (d *DHT) Run(c log.StandardLogger, ctx context.Context, host host.Host) error

type MDNS

type MDNS struct {
	DiscoveryServiceTag string
}

func (*MDNS) Option

func (d *MDNS) Option(ctx context.Context) func(c *libp2p.Config) error

func (*MDNS) Run

func (d *MDNS) Run(l log.StandardLogger, ctx context.Context, host host.Host) error

Jump to

Keyboard shortcuts

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