peerexchange

package
v0.2.24-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 27 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 {
	Bootnodes            []string
	DataDir              string
	AdvertiseAddress     string // Address to advertise to a peers.
	MinPeers             int
	FastCrawl, SlowCrawl time.Duration
}

Config for Discovery.

type Discovery

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

Discovery is struct that holds the protocol components, the protocol definition, the addr book data structure and more.

func New

func New(logger log.Log, h host.Host, config Config) (*Discovery, error)

New creates a Discovery instance.

func (*Discovery) AdvertisedAddress

func (d *Discovery) AdvertisedAddress() ma.Multiaddr

AdvertisedAddress returns advertised address.

func (*Discovery) Stop

func (d *Discovery) Stop()

Stop stops the discovery service.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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