Documentation ¶
Index ¶
- Variables
- type PeerRecord
- func (*PeerRecord) Descriptor() ([]byte, []int)
- func (m *PeerRecord) GetAddresses() []*PeerRecord_AddressInfo
- func (m *PeerRecord) GetPeerId() []byte
- func (m *PeerRecord) GetSeq() uint64
- func (m *PeerRecord) Marshal() (dAtA []byte, err error)
- func (m *PeerRecord) MarshalTo(dAtA []byte) (int, error)
- func (m *PeerRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PeerRecord) ProtoMessage()
- func (m *PeerRecord) Reset()
- func (m *PeerRecord) Size() (n int)
- func (m *PeerRecord) String() string
- func (m *PeerRecord) Unmarshal(dAtA []byte) error
- func (m *PeerRecord) XXX_DiscardUnknown()
- func (m *PeerRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PeerRecord) XXX_Merge(src proto.Message)
- func (m *PeerRecord) XXX_Size() int
- func (m *PeerRecord) XXX_Unmarshal(b []byte) error
- type PeerRecord_AddressInfo
- func (*PeerRecord_AddressInfo) Descriptor() ([]byte, []int)
- func (m *PeerRecord_AddressInfo) GetMultiaddr() []byte
- func (m *PeerRecord_AddressInfo) Marshal() (dAtA []byte, err error)
- func (m *PeerRecord_AddressInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *PeerRecord_AddressInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PeerRecord_AddressInfo) ProtoMessage()
- func (m *PeerRecord_AddressInfo) Reset()
- func (m *PeerRecord_AddressInfo) Size() (n int)
- func (m *PeerRecord_AddressInfo) String() string
- func (m *PeerRecord_AddressInfo) Unmarshal(dAtA []byte) error
- func (m *PeerRecord_AddressInfo) XXX_DiscardUnknown()
- func (m *PeerRecord_AddressInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PeerRecord_AddressInfo) XXX_Merge(src proto.Message)
- func (m *PeerRecord_AddressInfo) XXX_Size() int
- func (m *PeerRecord_AddressInfo) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
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"` }
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 ¶
func (*PeerRecord) Descriptor() ([]byte, []int)
func (*PeerRecord) GetAddresses ¶
func (m *PeerRecord) GetAddresses() []*PeerRecord_AddressInfo
func (*PeerRecord) GetPeerId ¶
func (m *PeerRecord) GetPeerId() []byte
func (*PeerRecord) GetSeq ¶
func (m *PeerRecord) GetSeq() uint64
func (*PeerRecord) Marshal ¶
func (m *PeerRecord) Marshal() (dAtA []byte, err error)
func (*PeerRecord) MarshalToSizedBuffer ¶
func (m *PeerRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PeerRecord) ProtoMessage ¶
func (*PeerRecord) ProtoMessage()
func (*PeerRecord) Reset ¶
func (m *PeerRecord) Reset()
func (*PeerRecord) Size ¶
func (m *PeerRecord) Size() (n int)
func (*PeerRecord) String ¶
func (m *PeerRecord) String() string
func (*PeerRecord) Unmarshal ¶
func (m *PeerRecord) Unmarshal(dAtA []byte) error
func (*PeerRecord) XXX_DiscardUnknown ¶
func (m *PeerRecord) XXX_DiscardUnknown()
func (*PeerRecord) XXX_Marshal ¶
func (m *PeerRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PeerRecord) XXX_Merge ¶
func (m *PeerRecord) XXX_Merge(src proto.Message)
func (*PeerRecord) XXX_Size ¶
func (m *PeerRecord) XXX_Size() int
func (*PeerRecord) XXX_Unmarshal ¶
func (m *PeerRecord) XXX_Unmarshal(b []byte) error
type PeerRecord_AddressInfo ¶
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 ¶
func (*PeerRecord_AddressInfo) Descriptor() ([]byte, []int)
func (*PeerRecord_AddressInfo) GetMultiaddr ¶
func (m *PeerRecord_AddressInfo) GetMultiaddr() []byte
func (*PeerRecord_AddressInfo) Marshal ¶
func (m *PeerRecord_AddressInfo) Marshal() (dAtA []byte, err error)
func (*PeerRecord_AddressInfo) MarshalTo ¶
func (m *PeerRecord_AddressInfo) MarshalTo(dAtA []byte) (int, error)
func (*PeerRecord_AddressInfo) MarshalToSizedBuffer ¶
func (m *PeerRecord_AddressInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PeerRecord_AddressInfo) ProtoMessage ¶
func (*PeerRecord_AddressInfo) ProtoMessage()
func (*PeerRecord_AddressInfo) Reset ¶
func (m *PeerRecord_AddressInfo) Reset()
func (*PeerRecord_AddressInfo) Size ¶
func (m *PeerRecord_AddressInfo) Size() (n int)
func (*PeerRecord_AddressInfo) String ¶
func (m *PeerRecord_AddressInfo) String() string
func (*PeerRecord_AddressInfo) Unmarshal ¶
func (m *PeerRecord_AddressInfo) Unmarshal(dAtA []byte) error
func (*PeerRecord_AddressInfo) XXX_DiscardUnknown ¶
func (m *PeerRecord_AddressInfo) XXX_DiscardUnknown()
func (*PeerRecord_AddressInfo) XXX_Marshal ¶
func (m *PeerRecord_AddressInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PeerRecord_AddressInfo) XXX_Merge ¶
func (m *PeerRecord_AddressInfo) XXX_Merge(src proto.Message)
func (*PeerRecord_AddressInfo) XXX_Size ¶
func (m *PeerRecord_AddressInfo) XXX_Size() int
func (*PeerRecord_AddressInfo) XXX_Unmarshal ¶
func (m *PeerRecord_AddressInfo) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.