pb

package
v0.28.1-0...-d35ccfa Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pb_peer_record_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PeerRecord

type PeerRecord struct {

	// peer_id contains a libp2p peer id in its binary representation.
	PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	// seq contains a monotonically-increasing sequence counter to order PeerRecords in time.
	Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"`
	// addresses is a list of public listen addresses for the peer.
	Addresses []*PeerRecord_AddressInfo `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// contains filtered or unexported fields
}

PeerRecord messages contain information that is useful to share with other peers. Currently, a PeerRecord contains the public listen addresses for a peer, but this is expected to expand to include other information in the future.

PeerRecords are designed to be serialized to bytes and placed inside of SignedEnvelopes before sharing with other peers. See https://github.com/libp2p/go-libp2p/core/record/pb/envelope.proto for the SignedEnvelope definition.

func (*PeerRecord) Descriptor deprecated

func (*PeerRecord) Descriptor() ([]byte, []int)

Deprecated: Use PeerRecord.ProtoReflect.Descriptor instead.

func (*PeerRecord) GetAddresses

func (x *PeerRecord) GetAddresses() []*PeerRecord_AddressInfo

func (*PeerRecord) GetPeerId

func (x *PeerRecord) GetPeerId() []byte

func (*PeerRecord) GetSeq

func (x *PeerRecord) GetSeq() uint64

func (*PeerRecord) ProtoMessage

func (*PeerRecord) ProtoMessage()

func (*PeerRecord) ProtoReflect

func (x *PeerRecord) ProtoReflect() protoreflect.Message

func (*PeerRecord) Reset

func (x *PeerRecord) Reset()

func (*PeerRecord) String

func (x *PeerRecord) String() string

type PeerRecord_AddressInfo

type PeerRecord_AddressInfo struct {
	Multiaddr []byte `protobuf:"bytes,1,opt,name=multiaddr,proto3" json:"multiaddr,omitempty"`
	// contains filtered or unexported fields
}

AddressInfo is a wrapper around a binary multiaddr. It is defined as a separate message to allow us to add per-address metadata in the future.

func (*PeerRecord_AddressInfo) Descriptor deprecated

func (*PeerRecord_AddressInfo) Descriptor() ([]byte, []int)

Deprecated: Use PeerRecord_AddressInfo.ProtoReflect.Descriptor instead.

func (*PeerRecord_AddressInfo) GetMultiaddr

func (x *PeerRecord_AddressInfo) GetMultiaddr() []byte

func (*PeerRecord_AddressInfo) ProtoMessage

func (*PeerRecord_AddressInfo) ProtoMessage()

func (*PeerRecord_AddressInfo) ProtoReflect

func (x *PeerRecord_AddressInfo) ProtoReflect() protoreflect.Message

func (*PeerRecord_AddressInfo) Reset

func (x *PeerRecord_AddressInfo) Reset()

func (*PeerRecord_AddressInfo) String

func (x *PeerRecord_AddressInfo) String() string

Jump to

Keyboard shortcuts

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