dht

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advertiser

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

func NewAdvertiser

func NewAdvertiser(node *pcpnode.Node) *Advertiser

func (*Advertiser) Advertise

func (a *Advertiser) Advertise(code string) error

func (Advertiser) Bootstrap

func (p Advertiser) Bootstrap() error

Bootstrap connects to a set of bootstrap nodes to connect to the DHT. This function is a no-op after it is called once.

func (*Advertiser) Shutdown

func (a *Advertiser) Shutdown()

type Discoverer

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

func NewDiscoverer

func NewDiscoverer(node *pcpnode.Node, code string) *Discoverer

func (Discoverer) Bootstrap

func (p Discoverer) Bootstrap() error

Bootstrap connects to a set of bootstrap nodes to connect to the DHT. This function is a no-op after it is called once.

func (*Discoverer) Discover

func (d *Discoverer) Discover(handler pcpnode.PeerHandler) error

func (*Discoverer) Shutdown

func (d *Discoverer) Shutdown()

Jump to

Keyboard shortcuts

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