p2p

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualMultiaddr

func EqualMultiaddr(a, b Multiaddr) bool

EqualMultiaddr checks if two multiaddrs are equal.

func EqualPeerID

func EqualPeerID(a, b PeerID) bool

Types

type Multiaddr

type Multiaddr = multiaddr.Multiaddr

Multiaddr is a wrapper for the canonical multiaddr type.

func CopyMultiaddr

func CopyMultiaddr(v Multiaddr) Multiaddr

CopyMultiaddr copies a multiaddr.

func UnmarshalMultiaddr

func UnmarshalMultiaddr(b []byte) (Multiaddr, error)

UnmarshalMultiaddr reads a multiaddr from the given bytes.

func UnmarshalMultiaddrFrom

func UnmarshalMultiaddrFrom(r io.Reader) (Multiaddr, error)

UnmarshalMultiaddrFrom reads a multiaddr from the given reader.

func UnmarshalMultiaddrJSON

func UnmarshalMultiaddrJSON(b []byte) (Multiaddr, error)

UnmarshalMultiaddrJSON reads a multiaddr as a string from the given JSON bytes.

type PeerID

type PeerID = peer.ID

func CopyPeerID

func CopyPeerID(v PeerID) PeerID

func UnmarshalPeerID

func UnmarshalPeerID(b []byte) (PeerID, error)

func UnmarshalPeerIDFrom

func UnmarshalPeerIDFrom(r io.Reader) (PeerID, error)

func UnmarshalPeerIDJSON

func UnmarshalPeerIDJSON(b []byte) (PeerID, error)

Jump to

Keyboard shortcuts

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