discovery

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceTag = "_ipfs-discovery._udp"

ServiceTag specifies the mdns service tag

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifee

type Notifee interface {
	HandlePeerFound(peer.AddrInfo)
}

Notifee is an interface that allows notifying other goroutines that we found a peer

type Service

type Service interface {
	io.Closer
	RegisterNotifee(Notifee)
	UnregisterNotifee(Notifee)
}

Service is an interface that one must satisfy to provide mdns discovery services

func NewMdnsService

func NewMdnsService(ctx context.Context, peerhost host.Host, interval time.Duration, logger *zap.Logger, serviceTag string) (Service, error)

NewMdnsService starts a new mdns service

Jump to

Keyboard shortcuts

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