mdns

package
v2.470.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MDNSServiceName = p2p_mdns.ServiceName
)

Variables

View Source
var DiscoveryTimeout = time.Second * 30

Functions

func DiscoveryHandler

func DiscoveryHandler(ctx context.Context, l *zap.Logger, h host.Host) p2p_mdns.Notifee

func GetMulticastInterfaces

func GetMulticastInterfaces() ([]net.Interface, error)

func NetworkManagerHandler added in v2.463.0

func NetworkManagerHandler(ctx context.Context, cfg NetworkManagerConfig)

func NewMdnsService

func NewMdnsService(logger *zap.Logger, host host.Host, serviceName string, notifee p2p_mdns.Notifee) p2p_mdns.Service

func SetNetDriver

func SetNetDriver(n Net)

Types

type Net

type Net interface {
	NetAddrs
	NetInterface
}

type NetAddrs

type NetAddrs interface {
	InterfaceAddrs() ([]net.Addr, error)
}

type NetInterface

type NetInterface interface {
	Interfaces() ([]net.Interface, error)
}

type NetworkManagerConfig added in v2.463.0

type NetworkManagerConfig struct {
	Logger     *zap.Logger
	NetManager *netmanager.NetManager
	Service    p2p_mdns.Service
}

Jump to

Keyboard shortcuts

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