proto

package
v0.23.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtoIDv1     = "/libp2p/circuit/relay/0.1.0"
	ProtoIDv2Hop  = "/libp2p/circuit/relay/0.2.0/hop"
	ProtoIDv2Stop = "/libp2p/circuit/relay/0.2.0/stop"
)
View Source
const RecordDomain = "libp2p-relay-rsvp"

Variables

View Source
var RecordCodec = []byte{0x03, 0x02}

TODO: register in multicodec table in https://github.com/multiformats/multicodec

Functions

This section is empty.

Types

type ReservationVoucher

type ReservationVoucher struct {
	// Relay is the ID of the peer providing relay service
	Relay peer.ID
	// Peer is the ID of the peer receiving relay service through Relay
	Peer peer.ID
	// Expiration is the expiration time of the reservation
	Expiration time.Time
}

func (*ReservationVoucher) Codec

func (rv *ReservationVoucher) Codec() []byte

func (*ReservationVoucher) Domain

func (rv *ReservationVoucher) Domain() string

func (*ReservationVoucher) MarshalRecord

func (rv *ReservationVoucher) MarshalRecord() ([]byte, error)

func (*ReservationVoucher) UnmarshalRecord

func (rv *ReservationVoucher) UnmarshalRecord(blob []byte) error

Jump to

Keyboard shortcuts

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