Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoDiscV5Listener = errors.New("no discv5 listener")
Functions ¶
This section is empty.
Types ¶
type DiscoveryV5 ¶
type DiscoveryV5 struct { sync.RWMutex NAT nat.Interface // contains filtered or unexported fields }
func NewDiscoveryV5 ¶
func NewDiscoveryV5(host host.Host, priv *ecdsa.PrivateKey, localnode *enode.LocalNode, peerConnector PeerConnector, log *zap.Logger, opts ...DiscoveryV5Option) (*DiscoveryV5, error)
func (*DiscoveryV5) IsStarted ¶
func (d *DiscoveryV5) IsStarted() bool
func (*DiscoveryV5) Iterator ¶ added in v0.4.0
func (d *DiscoveryV5) Iterator() (enode.Iterator, error)
func (*DiscoveryV5) Node ¶
func (d *DiscoveryV5) Node() *enode.Node
func (*DiscoveryV5) SetBootnodes ¶
func (d *DiscoveryV5) SetBootnodes(nodes []*enode.Node) error
func (*DiscoveryV5) Stop ¶
func (d *DiscoveryV5) Stop()
type DiscoveryV5Option ¶
type DiscoveryV5Option func(*discV5Parameters)
func DefaultOptions ¶
func DefaultOptions() []DiscoveryV5Option
func WithAdvertiseAddr ¶
func WithAdvertiseAddr(addr []multiaddr.Multiaddr) DiscoveryV5Option
func WithAutoUpdate ¶
func WithAutoUpdate(autoUpdate bool) DiscoveryV5Option
func WithBootnodes ¶
func WithBootnodes(bootnodes []*enode.Node) DiscoveryV5Option
func WithUDPPort ¶
func WithUDPPort(port uint) DiscoveryV5Option
type PeerConnector ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.