discovery

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KadDhtDiscoverer

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

KadDhtDiscoverer is the kad-dht discovery type implementation

func NewKadDhtPeerDiscoverer

func NewKadDhtPeerDiscoverer(
	refreshInterval time.Duration,
	randezVous string,
	initialPeersList []string) *KadDhtDiscoverer

NewKadDhtPeerDiscoverer creates a new kad-dht discovery type implementation initialPeersList can be nil or empty, no initial connection will be attempted, a warning message will appear

func (*KadDhtDiscoverer) ApplyContext added in v1.0.3

func (kdd *KadDhtDiscoverer) ApplyContext(ctxProvider p2p.ContextProvider) error

ApplyContext sets the context in which this discoverer is to be run

func (*KadDhtDiscoverer) Bootstrap

func (kdd *KadDhtDiscoverer) Bootstrap() error

Bootstrap will start the bootstrapping new peers process

func (*KadDhtDiscoverer) IsInterfaceNil

func (kdd *KadDhtDiscoverer) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*KadDhtDiscoverer) Name

func (kdd *KadDhtDiscoverer) Name() string

Name returns the name of the kad dht peer discovery implementation

func (*KadDhtDiscoverer) ReconnectToNetwork

func (kdd *KadDhtDiscoverer) ReconnectToNetwork() <-chan struct{}

ReconnectToNetwork will try to connect to one peer from the initial peer list

type NullDiscoverer added in v1.0.3

type NullDiscoverer struct {
}

NullDiscoverer is the non-functional peer discoverer aimed to be used when peer discovery options are all disabled

func NewNullDiscoverer added in v1.0.3

func NewNullDiscoverer() *NullDiscoverer

NewNullDiscoverer creates a new NullDiscoverer implementation

func (*NullDiscoverer) ApplyContext added in v1.0.3

func (nd *NullDiscoverer) ApplyContext(ctxProvider p2p.ContextProvider) error

ApplyContext is an empty func as the context is not required

func (*NullDiscoverer) Bootstrap added in v1.0.3

func (nd *NullDiscoverer) Bootstrap() error

Bootstrap will return nil. There is no implementation.

func (*NullDiscoverer) IsInterfaceNil added in v1.0.16

func (nd *NullDiscoverer) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*NullDiscoverer) Name added in v1.0.3

func (nd *NullDiscoverer) Name() string

Name returns a message which says no peer discovery mechanism is used

Jump to

Keyboard shortcuts

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