package proto

import "github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/proto"

Index

Constants

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

Variables

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

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

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

Source Files

protocol.go voucher.go

Version
v0.42.0 (latest)
Published
Jun 18, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
4 weeks ago

Tools for package owners.