go-libp2p-core: github.com/libp2p/go-libp2p-core/peer/pb Index | Files

package peer_pb

import "github.com/libp2p/go-libp2p-core/peer/pb"

Index

Package Files

peer_record.pb.go

Variables

var (
    ErrInvalidLengthPeerRecord        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowPeerRecord          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupPeerRecord = fmt.Errorf("proto: unexpected end of group")
)

type PeerRecord Uses

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"`
}

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 Uses

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

func (*PeerRecord) GetAddresses Uses

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

func (*PeerRecord) GetPeerId Uses

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

func (*PeerRecord) GetSeq Uses

func (m *PeerRecord) GetSeq() uint64

func (*PeerRecord) Marshal Uses

func (m *PeerRecord) Marshal() (dAtA []byte, err error)

func (*PeerRecord) MarshalTo Uses

func (m *PeerRecord) MarshalTo(dAtA []byte) (int, error)

func (*PeerRecord) MarshalToSizedBuffer Uses

func (m *PeerRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerRecord) ProtoMessage Uses

func (*PeerRecord) ProtoMessage()

func (*PeerRecord) Reset Uses

func (m *PeerRecord) Reset()

func (*PeerRecord) Size Uses

func (m *PeerRecord) Size() (n int)

func (*PeerRecord) String Uses

func (m *PeerRecord) String() string

func (*PeerRecord) Unmarshal Uses

func (m *PeerRecord) Unmarshal(dAtA []byte) error

func (*PeerRecord) XXX_DiscardUnknown Uses

func (m *PeerRecord) XXX_DiscardUnknown()

func (*PeerRecord) XXX_Marshal Uses

func (m *PeerRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerRecord) XXX_Merge Uses

func (m *PeerRecord) XXX_Merge(src proto.Message)

func (*PeerRecord) XXX_Size Uses

func (m *PeerRecord) XXX_Size() int

func (*PeerRecord) XXX_Unmarshal Uses

func (m *PeerRecord) XXX_Unmarshal(b []byte) error

type PeerRecord_AddressInfo Uses

type PeerRecord_AddressInfo struct {
    Multiaddr []byte `protobuf:"bytes,1,opt,name=multiaddr,proto3" json:"multiaddr,omitempty"`
}

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 Uses

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

func (*PeerRecord_AddressInfo) GetMultiaddr Uses

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

func (*PeerRecord_AddressInfo) Marshal Uses

func (m *PeerRecord_AddressInfo) Marshal() (dAtA []byte, err error)

func (*PeerRecord_AddressInfo) MarshalTo Uses

func (m *PeerRecord_AddressInfo) MarshalTo(dAtA []byte) (int, error)

func (*PeerRecord_AddressInfo) MarshalToSizedBuffer Uses

func (m *PeerRecord_AddressInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerRecord_AddressInfo) ProtoMessage Uses

func (*PeerRecord_AddressInfo) ProtoMessage()

func (*PeerRecord_AddressInfo) Reset Uses

func (m *PeerRecord_AddressInfo) Reset()

func (*PeerRecord_AddressInfo) Size Uses

func (m *PeerRecord_AddressInfo) Size() (n int)

func (*PeerRecord_AddressInfo) String Uses

func (m *PeerRecord_AddressInfo) String() string

func (*PeerRecord_AddressInfo) Unmarshal Uses

func (m *PeerRecord_AddressInfo) Unmarshal(dAtA []byte) error

func (*PeerRecord_AddressInfo) XXX_DiscardUnknown Uses

func (m *PeerRecord_AddressInfo) XXX_DiscardUnknown()

func (*PeerRecord_AddressInfo) XXX_Marshal Uses

func (m *PeerRecord_AddressInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerRecord_AddressInfo) XXX_Merge Uses

func (m *PeerRecord_AddressInfo) XXX_Merge(src proto.Message)

func (*PeerRecord_AddressInfo) XXX_Size Uses

func (m *PeerRecord_AddressInfo) XXX_Size() int

func (*PeerRecord_AddressInfo) XXX_Unmarshal Uses

func (m *PeerRecord_AddressInfo) XXX_Unmarshal(b []byte) error

Package peer_pb imports 5 packages (graph) and is imported by 2 packages. Updated 2020-02-11. Refresh now. Tools for package owners.