util

package
v0.1.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddrInfo added in v0.1.24

func GetAddrInfo(peerId string) string

* 如果输入peerId没有地址信息,通过路由表获取完整的地址信息 如果不在路由表中则原样返回,这地方有个问题,定位器有地址信息,客户端没有地址信息

func GetIdAddr

func GetIdAddr(saddr string) (string, string)

func GetPeerId added in v0.1.24

func GetPeerId(peerId string) string

func GetStringAddr

func GetStringAddr(addr string, peerId string) string

func Merge

func Merge(addrInfos []*peer.AddrInfo) *peer.AddrInfo

func MultiaddrToAddInfo

func MultiaddrToAddInfo(addrs []multiaddr.Multiaddr) []*peer.AddrInfo

func ToAddInfo

func ToAddInfo(peerId string, saddr string) (*peer.AddrInfo, error)

func ToAddInfos

func ToAddInfos(peerId string, address string) ([]*peer.AddrInfo, error)

func ToMultiaddr

func ToMultiaddr(saddrs []string) []multiaddr.Multiaddr

func ToString

func ToString(addrs []multiaddr.Multiaddr) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL