Versions in this module Expand all Collapse all v1 v1.1.1 Oct 29, 2019 Changes in this version + const NodeIDBits + const NodeIDBytes + const Version + type Findnode struct + Expiration uint64 + Rest []byte + Target NodeID + func (z *Findnode) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Findnode) UnmarshalMsg(bts []byte) (o []byte, err error) + func (z Findnode) EncodeMsg(en *msgp.Writer) (err error) + func (z Findnode) MarshalMsg(b []byte) (o []byte, err error) + func (z Findnode) Msgsize() (s int) + type Neighbors struct + Expiration uint64 + Nodes []RpcNode + Rest []byte + func (z *Neighbors) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Neighbors) EncodeMsg(en *msgp.Writer) (err error) + func (z *Neighbors) MarshalMsg(b []byte) (o []byte, err error) + func (z *Neighbors) Msgsize() (s int) + func (z *Neighbors) UnmarshalMsg(bts []byte) (o []byte, err error) + type Node struct + Contested bool + ID NodeID + IP types.IP + Sha types.Hash + 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 + func (z *Node) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Node) EncodeMsg(en *msgp.Writer) (err error) + func (z *Node) MarshalMsg(b []byte) (o []byte, err error) + func (z *Node) Msgsize() (s int) + func (z *Node) UnmarshalMsg(bts []byte) (o []byte, err error) + type NodeID [NodeIDBytes]byte + func BytesID(b []byte) (NodeID, error) + func HexID(in string) (NodeID, error) + func MustBytesID(b []byte) NodeID + func MustHexID(in string) NodeID + func PubkeyID(pub *ecdsa.PublicKey) NodeID + func (*NodeID) ExtensionType() int8 + func (*NodeID) Len() int + func (id NodeID) Pubkey() (*ecdsa.PublicKey, error) + func (n *NodeID) UnmarshalText(text []byte) error + func (n NodeID) Bytes() []byte + func (n NodeID) GoString() string + func (n NodeID) MarshalText() ([]byte, error) + func (n NodeID) String() string + func (n NodeID) TerminalString() string + func (nid *NodeID) MarshalBinaryTo(b []byte) error + func (nid *NodeID) UnmarshalBinary(b []byte) error + func (z *NodeID) DecodeMsg(dc *msgp.Reader) (err error) + func (z *NodeID) EncodeMsg(en *msgp.Writer) (err error) + func (z *NodeID) MarshalMsg(b []byte) (o []byte, err error) + func (z *NodeID) Msgsize() (s int) + func (z *NodeID) UnmarshalMsg(bts []byte) (o []byte, err error) + type Ping struct + Expiration uint64 + From RpcEndpoint + Rest []byte + To RpcEndpoint + Version uint + func (z *Ping) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Ping) EncodeMsg(en *msgp.Writer) (err error) + func (z *Ping) MarshalMsg(b []byte) (o []byte, err error) + func (z *Ping) Msgsize() (s int) + func (z *Ping) UnmarshalMsg(bts []byte) (o []byte, err error) + type Pong struct + Expiration uint64 + ReplyTok []byte + Rest []byte + To RpcEndpoint + func (z *Pong) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Pong) EncodeMsg(en *msgp.Writer) (err error) + func (z *Pong) MarshalMsg(b []byte) (o []byte, err error) + func (z *Pong) Msgsize() (s int) + func (z *Pong) UnmarshalMsg(bts []byte) (o []byte, err error) + type RpcEndpoint struct + IP types.IP + TCP uint16 + UDP uint16 + func (z *RpcEndpoint) DecodeMsg(dc *msgp.Reader) (err error) + func (z *RpcEndpoint) UnmarshalMsg(bts []byte) (o []byte, err error) + func (z RpcEndpoint) EncodeMsg(en *msgp.Writer) (err error) + func (z RpcEndpoint) MarshalMsg(b []byte) (o []byte, err error) + func (z RpcEndpoint) Msgsize() (s int) + type RpcNode struct + ID NodeID + IP types.IP + TCP uint16 + UDP uint16 + func (z *RpcNode) DecodeMsg(dc *msgp.Reader) (err error) + func (z *RpcNode) EncodeMsg(en *msgp.Writer) (err error) + func (z *RpcNode) MarshalMsg(b []byte) (o []byte, err error) + func (z *RpcNode) Msgsize() (s int) + func (z *RpcNode) UnmarshalMsg(bts []byte) (o []byte, err error) + type Table struct + func ListenUDP(priv *ecdsa.PrivateKey, laddr string, natm nat.Interface, nodeDBPath string, ...) (*Table, error) + func (tab *Table) Close() + func (tab *Table) Lookup(targetID NodeID) []*Node + func (tab *Table) ReadRandomNodes(buf []*Node) (n int) + func (tab *Table) Resolve(targetID NodeID) *Node + func (tab *Table) Self() *Node + func (tab *Table) SetFallbackNodes(nodes []*Node) error