Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectablePeer ¶
func DeriveDetailsFromNode ¶
func DeriveDetailsFromNode(node *enode.Node) (*ConnectablePeer, error)
type DiscV4 ¶
type DiscV4 struct {
// contains filtered or unexported fields
}
DiscV4 implements the discovery v4 protocol for finding Ethereum nodes.
func (*DiscV4) OnNodeRecord ¶
func (d *DiscV4) OnNodeRecord(ctx context.Context, handler func(ctx context.Context, reason *enode.Node) error)
OnNodeRecord registers a handler to be called when new nodes are discovered.
func (*DiscV4) UpdateBootNodes ¶
UpdateBootNodes updates the list of bootstrap nodes used for discovery.
type DiscV5 ¶
type DiscV5 struct {
// contains filtered or unexported fields
}
DiscV5 implements the discovery v5 protocol for finding Ethereum nodes.
func (*DiscV5) OnNodeRecord ¶
func (d *DiscV5) OnNodeRecord(ctx context.Context, handler func(ctx context.Context, reason *enode.Node) error)
OnNodeRecord registers a handler to be called when new nodes are discovered.
func (*DiscV5) UpdateBootNodes ¶
UpdateBootNodes updates the list of bootstrap nodes used for discovery.
type ListenerV4 ¶
type ListenerV4 struct {
// contains filtered or unexported fields
}
ListenerV4 manages the UDP connection and discovery protocol instance.
func (*ListenerV4) Close ¶
func (l *ListenerV4) Close() error
Close shuts down the listener and releases all resources.
func (*ListenerV4) GetLocalNodeID ¶
func (l *ListenerV4) GetLocalNodeID() *enode.ID
GetLocalNodeID returns the local node ID in a thread-safe manner.
type ListenerV5 ¶
type ListenerV5 struct {
// contains filtered or unexported fields
}
ListenerV5 manages the UDP connection and discovery protocol instance.
func (*ListenerV5) Close ¶
func (l *ListenerV5) Close() error
Close shuts down the listener and releases all resources.
func (*ListenerV5) GetLocalNodeID ¶
func (l *ListenerV5) GetLocalNodeID() *enode.ID
GetLocalNodeID returns the local node ID in a thread-safe manner.
type Manual ¶
type Manual struct {
// contains filtered or unexported fields
}
Manual is a NodeFinder that allows you to manually add nodes to the discovery pool.