Documentation ¶
Index ¶
- func GetAddrInfo(peerId string) string
- func GetIdAddr(saddr string) (string, string)
- func GetPeerId(peerId string) string
- func GetStringAddr(addr string, peerId string) string
- func Merge(addrInfos []*peer.AddrInfo) *peer.AddrInfo
- func MultiaddrToAddInfo(addrs []multiaddr.Multiaddr) []*peer.AddrInfo
- func ToAddInfo(peerId string, saddr string) (*peer.AddrInfo, error)
- func ToAddInfos(peerId string, address string) ([]*peer.AddrInfo, error)
- func ToMultiaddr(saddrs []string) []multiaddr.Multiaddr
- func ToString(addrs []multiaddr.Multiaddr) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAddrInfo ¶ added in v0.1.24
* 如果输入peerId没有地址信息,通过路由表获取完整的地址信息 如果不在路由表中则原样返回,这地方有个问题,定位器有地址信息,客户端没有地址信息
func GetStringAddr ¶
func MultiaddrToAddInfo ¶
func ToMultiaddr ¶
func ToMultiaddr(saddrs []string) []multiaddr.Multiaddr
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.