Documentation ¶
Index ¶
- type KadDhtDiscoverer
- func (kdd *KadDhtDiscoverer) ApplyContext(ctxProvider p2p.ContextProvider) error
- func (kdd *KadDhtDiscoverer) Bootstrap() error
- func (kdd *KadDhtDiscoverer) IsDiscoveryPaused() bool
- func (kdd *KadDhtDiscoverer) IsInterfaceNil() bool
- func (kdd *KadDhtDiscoverer) Name() string
- func (kdd *KadDhtDiscoverer) Pause()
- func (kdd *KadDhtDiscoverer) ReconnectToNetwork() <-chan struct{}
- func (kdd *KadDhtDiscoverer) Resume()
- type NullDiscoverer
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) IsDiscoveryPaused ¶
func (kdd *KadDhtDiscoverer) IsDiscoveryPaused() bool
IsDiscoveryPaused will return true if the discoverer is initiating connections
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) Pause ¶
func (kdd *KadDhtDiscoverer) Pause()
Pause will suspend the discovery process
func (*KadDhtDiscoverer) ReconnectToNetwork ¶
func (kdd *KadDhtDiscoverer) ReconnectToNetwork() <-chan struct{}
ReconnectToNetwork will try to connect to one peer from the initial peer list
func (*KadDhtDiscoverer) Resume ¶
func (kdd *KadDhtDiscoverer) Resume()
Resume will resume the discovery process
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