Documentation ¶
Index ¶
- Variables
- type DiscoveryRequest
- func (*DiscoveryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DiscoveryRequest) GetTimestamp() int64
- func (x *DiscoveryRequest) Name() string
- func (*DiscoveryRequest) ProtoMessage()
- func (x *DiscoveryRequest) ProtoReflect() protoreflect.Message
- func (x *DiscoveryRequest) Reset()
- func (x *DiscoveryRequest) String() string
- func (x *DiscoveryRequest) Type() MType
- type DiscoveryResponse
- func (*DiscoveryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DiscoveryResponse) GetPeers() []*proto1.Peer
- func (x *DiscoveryResponse) GetReqHash() []byte
- func (x *DiscoveryResponse) Name() string
- func (*DiscoveryResponse) ProtoMessage()
- func (x *DiscoveryResponse) ProtoReflect() protoreflect.Message
- func (x *DiscoveryResponse) Reset()
- func (x *DiscoveryResponse) String() string
- func (x *DiscoveryResponse) Type() MType
- type MType
- type Message
- type Ping
- func (*Ping) Descriptor() ([]byte, []int)deprecated
- func (x *Ping) GetDstAddr() string
- func (x *Ping) GetNetworkId() uint32
- func (x *Ping) GetSrcAddr() string
- func (x *Ping) GetSrcPort() uint32
- func (x *Ping) GetTimestamp() int64
- func (x *Ping) GetVersion() uint32
- func (x *Ping) Name() string
- func (*Ping) ProtoMessage()
- func (x *Ping) ProtoReflect() protoreflect.Message
- func (x *Ping) Reset()
- func (x *Ping) String() string
- func (x *Ping) Type() MType
- type Pong
- func (*Pong) Descriptor() ([]byte, []int)deprecated
- func (x *Pong) GetDstAddr() string
- func (x *Pong) GetReqHash() []byte
- func (x *Pong) GetServices() *proto.ServiceMap
- func (x *Pong) Name() string
- func (*Pong) ProtoMessage()
- func (x *Pong) ProtoReflect() protoreflect.Message
- func (x *Pong) Reset()
- func (x *Pong) String() string
- func (x *Pong) Type() MType
Constants ¶
This section is empty.
Variables ¶
View Source
var File_discover_proto_message_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DiscoveryRequest ¶
type DiscoveryRequest struct { // unix time Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*DiscoveryRequest) Descriptor
deprecated
func (*DiscoveryRequest) Descriptor() ([]byte, []int)
Deprecated: Use DiscoveryRequest.ProtoReflect.Descriptor instead.
func (*DiscoveryRequest) GetTimestamp ¶
func (x *DiscoveryRequest) GetTimestamp() int64
func (*DiscoveryRequest) Name ¶
func (x *DiscoveryRequest) Name() string
func (*DiscoveryRequest) ProtoMessage ¶
func (*DiscoveryRequest) ProtoMessage()
func (*DiscoveryRequest) ProtoReflect ¶
func (x *DiscoveryRequest) ProtoReflect() protoreflect.Message
func (*DiscoveryRequest) Reset ¶
func (x *DiscoveryRequest) Reset()
func (*DiscoveryRequest) String ¶
func (x *DiscoveryRequest) String() string
func (*DiscoveryRequest) Type ¶
func (x *DiscoveryRequest) Type() MType
type DiscoveryResponse ¶
type DiscoveryResponse struct { // hash of the corresponding request ReqHash []byte `protobuf:"bytes,1,opt,name=req_hash,json=reqHash,proto3" json:"req_hash,omitempty"` // list of peers Peers []*proto1.Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` // contains filtered or unexported fields }
func (*DiscoveryResponse) Descriptor
deprecated
func (*DiscoveryResponse) Descriptor() ([]byte, []int)
Deprecated: Use DiscoveryResponse.ProtoReflect.Descriptor instead.
func (*DiscoveryResponse) GetPeers ¶
func (x *DiscoveryResponse) GetPeers() []*proto1.Peer
func (*DiscoveryResponse) GetReqHash ¶
func (x *DiscoveryResponse) GetReqHash() []byte
func (*DiscoveryResponse) Name ¶
func (x *DiscoveryResponse) Name() string
func (*DiscoveryResponse) ProtoMessage ¶
func (*DiscoveryResponse) ProtoMessage()
func (*DiscoveryResponse) ProtoReflect ¶
func (x *DiscoveryResponse) ProtoReflect() protoreflect.Message
func (*DiscoveryResponse) Reset ¶
func (x *DiscoveryResponse) Reset()
func (*DiscoveryResponse) String ¶
func (x *DiscoveryResponse) String() string
func (*DiscoveryResponse) Type ¶
func (x *DiscoveryResponse) Type() MType
type Message ¶
type Message interface { proto.Message // Name returns the name of the corresponding message type for debugging. Name() string // Type returns the type of the corresponding message as an enum. Type() MType }
Message extends the proto.Message interface with additional util functions.
type Ping ¶
type Ping struct { // version number and network ID to classify the protocol Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` NetworkId uint32 `protobuf:"varint,2,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` // unix time Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // endpoint of the sender; port and string form of the return IP address (e.g. "192.0.2.1", "[2001:db8::1]") SrcAddr string `protobuf:"bytes,4,opt,name=src_addr,json=srcAddr,proto3" json:"src_addr,omitempty"` SrcPort uint32 `protobuf:"varint,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` // string form of receiver's IP // This provides a way to discover the the external address (after NAT). DstAddr string `protobuf:"bytes,6,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` // contains filtered or unexported fields }
func (*Ping) Descriptor
deprecated
func (*Ping) GetDstAddr ¶
func (*Ping) GetNetworkId ¶
func (*Ping) GetSrcAddr ¶
func (*Ping) GetSrcPort ¶
func (*Ping) GetTimestamp ¶
func (*Ping) GetVersion ¶
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
func (*Ping) ProtoReflect ¶
func (x *Ping) ProtoReflect() protoreflect.Message
type Pong ¶
type Pong struct { // hash of the ping packet ReqHash []byte `protobuf:"bytes,1,opt,name=req_hash,json=reqHash,proto3" json:"req_hash,omitempty"` // services supported by the sender Services *proto.ServiceMap `protobuf:"bytes,2,opt,name=services,proto3" json:"services,omitempty"` // string form of receiver's IP // This should mirror the source IP of the Ping's IP packet. It provides a way to discover the the external address (after NAT). DstAddr string `protobuf:"bytes,3,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` // contains filtered or unexported fields }
func (*Pong) Descriptor
deprecated
func (*Pong) GetDstAddr ¶
func (*Pong) GetReqHash ¶
func (*Pong) GetServices ¶
func (x *Pong) GetServices() *proto.ServiceMap
func (*Pong) ProtoMessage ¶
func (*Pong) ProtoMessage()
func (*Pong) ProtoReflect ¶
func (x *Pong) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.