discovery

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: GPL-3.0 Imports: 15 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
	// contains filtered or unexported fields
}

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