Versions in this module Expand all Collapse all v1 v1.1.2 Sep 16, 2021 Changes in this version + const Version + func QueryDNSSeeds(lookupHost func(host string) (addrs []string, err error)) ([]string, error) + type AbsTime time.Duration + func Now() AbsTime + type Config struct + AnnounceAddr *net.UDPAddr + Bootnodes []*Node + NodeDBPath string + PrivateKey *ecdsa.PrivateKey + Unhandled chan<- ReadPacket + type Network struct + func ListenUDP(priv ed25519.PrivateKey, conn conn, realaddr *net.UDPAddr, nodeDBPath string, ...) (*Network, error) + func NewDiscover(config *cfg.Config, priv ed25519.PrivateKey, port uint16) (*Network, error) + func (net *Network) Close() + func (net *Network) Lookup(targetID NodeID) []*Node + func (net *Network) ReadRandomNodes(buf []*Node) (n int) + func (net *Network) RegisterTopic(topic Topic, stop <-chan struct{}) + func (net *Network) Resolve(targetID NodeID) *Node + func (net *Network) SearchTopic(topic Topic, setPeriod <-chan time.Duration, found chan<- *Node, ...) + func (net *Network) Self() *Node + func (net *Network) SetFallbackNodes(nodes []*Node) error + type Node struct + ID NodeID + IP net.IP + TCP uint16 + UDP uint16 + func MustParseNode(rawurl string) *Node + func NewNode(id NodeID, ip net.IP, udpPort, tcpPort uint16) *Node + func ParseNode(rawurl string) (*Node, error) + func (n *Node) Incomplete() bool + func (n *Node) MarshalText() ([]byte, error) + func (n *Node) String() string + func (n *Node) UnmarshalText(text []byte) error + type NodeID [32]byte + func ByteID(in []byte) NodeID + func HexID(in string) (NodeID, error) + func MustHexID(in string) NodeID + func PubkeyID(pub *ecdsa.PublicKey) NodeID + func (n NodeID) GoString() string + func (n NodeID) String() string + func (n NodeID) TerminalString() string + type ReadPacket struct + Addr *net.UDPAddr + Data []byte + type Table struct + type Topic string