discovery

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

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

func New

func New(h host.Host, opts ...Opt) (*Discovery, error)

func (*Discovery) Start

func (d *Discovery) Start()

func (*Discovery) Stop

func (d *Discovery) Stop()

type Opt

type Opt func(*Discovery)

func DisableDHT added in v1.0.9

func DisableDHT() Opt

func Private

func Private() Opt

func Server

func Server() Opt

func WithBackup

func WithBackup(backup []peer.AddrInfo) Opt

func WithBootnodes

func WithBootnodes(bootnodes []peer.AddrInfo) Opt

func WithBootstrapDuration

func WithBootstrapDuration(bootstrapDuration time.Duration) Opt

func WithDir

func WithDir(path string) Opt

func WithDirect added in v1.0.9

func WithDirect(direct []peer.AddrInfo) Opt

func WithHighPeers added in v1.0.8

func WithHighPeers(peers int) Opt

func WithLogger

func WithLogger(logger *zap.Logger) Opt

func WithMinPeers

func WithMinPeers(minPeers int) Opt

func WithPeriod

func WithPeriod(period time.Duration) Opt

func WithTimeout

func WithTimeout(timeout time.Duration) Opt

Jump to

Keyboard shortcuts

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