discovery

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DiscoveryInterval time.Duration
	MaxConnections    int
}

Config contains discovery configuration

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles peer discovery operations without a DHT dependency. Note: The constructor intentionally accepts a second parameter of type interface{} to remain source-compatible with previous call sites that passed a DHT instance. The value is ignored.

func NewManager

func NewManager(h host.Host, _ interface{}, logger *zap.Logger) *Manager

NewManager creates a new discovery manager.

The second parameter is intentionally typed as interface{} so callers that previously passed a DHT instance can continue to do so; the value is ignored.

func NewManagerSimple

func NewManagerSimple(h host.Host, logger *zap.Logger) *Manager

NewManagerSimple creates a manager with a cleaner signature (host + logger).

func (*Manager) Start

func (d *Manager) Start(config Config) error

Start begins periodic peer discovery

func (*Manager) Stop

func (d *Manager) Stop()

Stop stops peer discovery

Jump to

Keyboard shortcuts

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