MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / IDAddressString

Function IDAddressString

p2p/netaddress.go:33–36  ·  view source on GitHub ↗

IDAddressString returns id@hostPort. It strips the leading protocol from protocolHostPort if it exists.

(id ID, protocolHostPort string)

Source from the content-addressed store, hash-verified

31// IDAddressString returns id@hostPort. It strips the leading
32// protocol from protocolHostPort if it exists.
33func IDAddressString(id ID, protocolHostPort string) string {
34 hostPort := removeProtocolIfDefined(protocolHostPort)
35 return fmt.Sprintf("%s@%s", id, hostPort)
36}
37
38// NewNetAddress returns a new NetAddress using the provided TCP
39// address. When testing, other net.Addr (except TCP) will result in

Callers 14

randIPv4AddressFunction · 0.92
OnStartMethod · 0.92
persistentPeersStringFunction · 0.92
OnStartMethod · 0.92
ValidateMethod · 0.85
NetAddressMethod · 0.85

Calls 1

removeProtocolIfDefinedFunction · 0.85