Documentation ¶
Index ¶
- type DiscoveryRequest
- func (*DiscoveryRequest) Descriptor() ([]byte, []int)
- func (m *DiscoveryRequest) GetTimestamp() int64
- func (m *DiscoveryRequest) Name() string
- func (*DiscoveryRequest) ProtoMessage()
- func (m *DiscoveryRequest) Reset()
- func (m *DiscoveryRequest) String() string
- func (m *DiscoveryRequest) Type() MType
- func (m *DiscoveryRequest) XXX_DiscardUnknown()
- func (m *DiscoveryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DiscoveryRequest) XXX_Merge(src proto.Message)
- func (m *DiscoveryRequest) XXX_Size() int
- func (m *DiscoveryRequest) XXX_Unmarshal(b []byte) error
- type DiscoveryResponse
- func (*DiscoveryResponse) Descriptor() ([]byte, []int)
- func (m *DiscoveryResponse) GetPeers() []*proto2.Peer
- func (m *DiscoveryResponse) GetReqHash() []byte
- func (m *DiscoveryResponse) Name() string
- func (*DiscoveryResponse) ProtoMessage()
- func (m *DiscoveryResponse) Reset()
- func (m *DiscoveryResponse) String() string
- func (m *DiscoveryResponse) Type() MType
- func (m *DiscoveryResponse) XXX_DiscardUnknown()
- func (m *DiscoveryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DiscoveryResponse) XXX_Merge(src proto.Message)
- func (m *DiscoveryResponse) XXX_Size() int
- func (m *DiscoveryResponse) XXX_Unmarshal(b []byte) error
- type MType
- type Message
- type Ping
- func (*Ping) Descriptor() ([]byte, []int)
- func (m *Ping) GetDstAddr() string
- func (m *Ping) GetNetworkId() uint32
- func (m *Ping) GetSrcAddr() string
- func (m *Ping) GetSrcPort() uint32
- func (m *Ping) GetTimestamp() int64
- func (m *Ping) GetVersion() uint32
- func (m *Ping) Name() string
- func (*Ping) ProtoMessage()
- func (m *Ping) Reset()
- func (m *Ping) String() string
- func (m *Ping) Type() MType
- func (m *Ping) XXX_DiscardUnknown()
- func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ping) XXX_Merge(src proto.Message)
- func (m *Ping) XXX_Size() int
- func (m *Ping) XXX_Unmarshal(b []byte) error
- type Pong
- func (*Pong) Descriptor() ([]byte, []int)
- func (m *Pong) GetDstAddr() string
- func (m *Pong) GetReqHash() []byte
- func (m *Pong) GetServices() *proto1.ServiceMap
- func (m *Pong) Name() string
- func (*Pong) ProtoMessage()
- func (m *Pong) Reset()
- func (m *Pong) String() string
- func (m *Pong) Type() MType
- func (m *Pong) XXX_DiscardUnknown()
- func (m *Pong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pong) XXX_Merge(src proto.Message)
- func (m *Pong) XXX_Size() int
- func (m *Pong) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DiscoveryRequest) Descriptor ¶
func (*DiscoveryRequest) Descriptor() ([]byte, []int)
func (*DiscoveryRequest) GetTimestamp ¶
func (m *DiscoveryRequest) GetTimestamp() int64
func (*DiscoveryRequest) Name ¶
func (m *DiscoveryRequest) Name() string
func (*DiscoveryRequest) ProtoMessage ¶
func (*DiscoveryRequest) ProtoMessage()
func (*DiscoveryRequest) Reset ¶
func (m *DiscoveryRequest) Reset()
func (*DiscoveryRequest) String ¶
func (m *DiscoveryRequest) String() string
func (*DiscoveryRequest) Type ¶
func (m *DiscoveryRequest) Type() MType
func (*DiscoveryRequest) XXX_DiscardUnknown ¶
func (m *DiscoveryRequest) XXX_DiscardUnknown()
func (*DiscoveryRequest) XXX_Marshal ¶
func (m *DiscoveryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DiscoveryRequest) XXX_Merge ¶
func (m *DiscoveryRequest) XXX_Merge(src proto.Message)
func (*DiscoveryRequest) XXX_Size ¶
func (m *DiscoveryRequest) XXX_Size() int
func (*DiscoveryRequest) XXX_Unmarshal ¶
func (m *DiscoveryRequest) XXX_Unmarshal(b []byte) error
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 []*proto2.Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DiscoveryResponse) Descriptor ¶
func (*DiscoveryResponse) Descriptor() ([]byte, []int)
func (*DiscoveryResponse) GetPeers ¶
func (m *DiscoveryResponse) GetPeers() []*proto2.Peer
func (*DiscoveryResponse) GetReqHash ¶
func (m *DiscoveryResponse) GetReqHash() []byte
func (*DiscoveryResponse) Name ¶
func (m *DiscoveryResponse) Name() string
func (*DiscoveryResponse) ProtoMessage ¶
func (*DiscoveryResponse) ProtoMessage()
func (*DiscoveryResponse) Reset ¶
func (m *DiscoveryResponse) Reset()
func (*DiscoveryResponse) String ¶
func (m *DiscoveryResponse) String() string
func (*DiscoveryResponse) Type ¶
func (m *DiscoveryResponse) Type() MType
func (*DiscoveryResponse) XXX_DiscardUnknown ¶
func (m *DiscoveryResponse) XXX_DiscardUnknown()
func (*DiscoveryResponse) XXX_Marshal ¶
func (m *DiscoveryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DiscoveryResponse) XXX_Merge ¶
func (m *DiscoveryResponse) XXX_Merge(src proto.Message)
func (*DiscoveryResponse) XXX_Size ¶
func (m *DiscoveryResponse) XXX_Size() int
func (*DiscoveryResponse) XXX_Unmarshal ¶
func (m *DiscoveryResponse) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Ping) Descriptor ¶
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) XXX_DiscardUnknown ¶
func (m *Ping) XXX_DiscardUnknown()
func (*Ping) XXX_Unmarshal ¶
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 *proto1.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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Pong) Descriptor ¶
func (*Pong) GetDstAddr ¶
func (*Pong) GetReqHash ¶
func (*Pong) GetServices ¶
func (m *Pong) GetServices() *proto1.ServiceMap
func (*Pong) ProtoMessage ¶
func (*Pong) ProtoMessage()
func (*Pong) XXX_DiscardUnknown ¶
func (m *Pong) XXX_DiscardUnknown()
func (*Pong) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.