Documentation ¶
Overview ¶
Package protocol defines the libp2p webmesh protocol.
Index ¶
Constants ¶
const Code = 613
Code is the code for the webmesh libp2p protocol.
const ID = "webmesh"
ID is the ID for the webmesh libp2p protocol.
const P_WEBMESH = Code
P_WEBMESH is the code for the webmesh libp2p protocol.
const SecurityID = "/webmesh/id/1.0.0"
SecurityID is the protocol ID of the security protocol.
Variables ¶
var ErrNoPeerID = fmt.Errorf("no peer ID in webmesh multiaddr")
ErrNoPeerID is returned when a webmesh multiaddr does not contain a peer ID.
var ErrNoRedezvous = fmt.Errorf("no rendezvous in webmesh multiaddr")
ErrNoRedezvous is returned when a webmesh multiaddr does not contain a rendezvous.
var Protocol = multiaddr.Protocol{ Name: ID, Code: Code, VCode: multiaddr.CodeToVarint(Code), Size: -1, Path: true, Transcoder: multiaddr.NewTranscoderFromFunctions(protocolStrToBytes, protocolBytesToStr, validateBytes), }
Protocol is the webmesh libp2p protocol.
Functions ¶
func PeerIDFromWebmeshAddr ¶
PeerIDFromWebmeshAddr returns the peer ID argument from a webmesh multiaddr.
func RendezvousFromWebmeshAddr ¶
RendezvousFromWebmeshAddr returns the rendezvous argument from a webmesh multiaddr.
func WithPeerID ¶
WithPeerID returns a webmesh multiaddr with the given peer ID.
func WithPeerIDAndRendezvous ¶
WithPeerIDAndRendezvous returns a webmesh multiaddr with the given peer ID and rendezvous.
Types ¶
This section is empty.