mirror of
https://github.com/status-im/status-go.git
synced 2025-02-03 02:15:18 +00:00
eeca435064
Update vendor Integrate rendezvous into status node Add a test with failover using rendezvous Use multiple servers in client Use discovery V5 by default and test that node can be started with rendezvous discovet Fix linter Update rendezvous client to one with instrumented stream Address feedback Fix test with updated topic limits Apply several suggestions Change log to debug for request errors because we continue execution Remove web3js after rebase Update rendezvous package
46 lines
1.4 KiB
Go
46 lines
1.4 KiB
Go
package multiaddr
|
|
|
|
/*
|
|
Multiaddr is a cross-protocol, cross-platform format for representing
|
|
internet addresses. It emphasizes explicitness and self-description.
|
|
Learn more here: https://github.com/multiformats/multiaddr
|
|
|
|
Multiaddrs have both a binary and string representation.
|
|
|
|
import ma "github.com/multiformats/go-multiaddr"
|
|
|
|
addr, err := ma.NewMultiaddr("/ip4/1.2.3.4/tcp/80")
|
|
// err non-nil when parsing failed.
|
|
|
|
*/
|
|
type Multiaddr interface {
|
|
// Equal returns whether two Multiaddrs are exactly equal
|
|
Equal(Multiaddr) bool
|
|
|
|
// Bytes returns the []byte representation of this Multiaddr
|
|
Bytes() []byte
|
|
|
|
// String returns the string representation of this Multiaddr
|
|
// (may panic if internal state is corrupted)
|
|
String() string
|
|
|
|
// Protocols returns the list of Protocols this Multiaddr includes
|
|
// will panic if protocol code incorrect (and bytes accessed incorrectly)
|
|
Protocols() []Protocol
|
|
|
|
// Encapsulate wraps this Multiaddr around another. For example:
|
|
//
|
|
// /ip4/1.2.3.4 encapsulate /tcp/80 = /ip4/1.2.3.4/tcp/80
|
|
//
|
|
Encapsulate(Multiaddr) Multiaddr
|
|
|
|
// Decapsultate removes a Multiaddr wrapping. For example:
|
|
//
|
|
// /ip4/1.2.3.4/tcp/80 decapsulate /ip4/1.2.3.4 = /tcp/80
|
|
//
|
|
Decapsulate(Multiaddr) Multiaddr
|
|
|
|
// ValueForProtocol returns the value (if any) following the specified protocol
|
|
ValueForProtocol(code int) (string, error)
|
|
}
|