Versions in this module Expand all Collapse all v0 v0.1.2 Jan 7, 2022 Changes in this version + const Version + type Node struct + Hash common.Hash + ID NodeId + IP net.IP + TCP uint16 + UDP uint16 + func NewNode(ip net.IP, tcpPort, udpPort uint16, id NodeId) *Node + func ParseNode(rawurl string) (*Node, error) + func (n *Node) String() string + func (n *Node) TcpAddr() *net.TCPAddr + func (n *Node) UdpAddr() *net.UDPAddr + type NodeId [nodeIdLen]byte + func Hex2NodeId(s string) (NodeId, error) + func MustHex2NodeId(in string) NodeId + func PubKey2NodeId(pub ecdsa.PublicKey) NodeId + func (id NodeId) String() string + type Table struct + func ListenUDP(priv *ecdsa.PrivateKey, laddr string, nodeDBPath string, mapper nat.Mapper) (*Table, error) + func NewUDP(priv *ecdsa.PrivateKey, c conn, nodeDBPath string, mapper nat.Mapper) (*Table, *udp) + func (tab *Table) Bootstrap(nodes []*Node) + func (tab *Table) Close() + func (tab *Table) Lookup(targetID NodeId) []*Node + func (tab *Table) ReadRandomNodes(buf []*Node) (n int) + func (tab *Table) Self() *Node