Documentation ¶
Index ¶
- Variables
- type Error
- func (*Error) Descriptor() ([]byte, []int)
- func (m *Error) Marshal() (dAtA []byte, err error)
- func (m *Error) MarshalTo(dAtA []byte) (int, error)
- func (m *Error) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Error) ProtoMessage()
- func (m *Error) Reset()
- func (m *Error) Size() (n int)
- func (m *Error) String() string
- func (m *Error) Unmarshal(dAtA []byte) error
- func (m *Error) XXX_DiscardUnknown()
- func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Error) XXX_Merge(src proto.Message)
- func (m *Error) XXX_Size() int
- func (m *Error) XXX_Unmarshal(b []byte) error
- type Intermediate
- func (*Intermediate) Descriptor() ([]byte, []int)
- func (m *Intermediate) Marshal() (dAtA []byte, err error)
- func (m *Intermediate) MarshalTo(dAtA []byte) (int, error)
- func (m *Intermediate) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Intermediate) ProtoMessage()
- func (m *Intermediate) Reset()
- func (m *Intermediate) Size() (n int)
- func (m *Intermediate) String() string
- func (m *Intermediate) Unmarshal(dAtA []byte) error
- func (m *Intermediate) XXX_DiscardUnknown()
- func (m *Intermediate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Intermediate) XXX_Merge(src proto.Message)
- func (m *Intermediate) XXX_Size() int
- func (m *Intermediate) XXX_Unmarshal(b []byte) error
- type Msg
- func (*Msg) Descriptor() ([]byte, []int)
- func (m *Msg) Marshal() (dAtA []byte, err error)
- func (m *Msg) MarshalTo(dAtA []byte) (int, error)
- func (m *Msg) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Msg) ProtoMessage()
- func (m *Msg) Reset()
- func (m *Msg) Size() (n int)
- func (m *Msg) String() string
- func (m *Msg) Unmarshal(dAtA []byte) error
- func (m *Msg) XXX_DiscardUnknown()
- func (m *Msg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Msg) XXX_Merge(src proto.Message)
- func (m *Msg) XXX_Size() int
- func (m *Msg) XXX_Unmarshal(b []byte) error
- type Msg_MsgType
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) Marshal() (dAtA []byte, err error)
- func (m *Request) MarshalTo(dAtA []byte) (int, error)
- func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) Size() (n int)
- func (m *Request) String() string
- func (m *Request) Unmarshal(dAtA []byte) error
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type RequestControl
- func (*RequestControl) Descriptor() ([]byte, []int)
- func (m *RequestControl) Marshal() (dAtA []byte, err error)
- func (m *RequestControl) MarshalTo(dAtA []byte) (int, error)
- func (m *RequestControl) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RequestControl) ProtoMessage()
- func (m *RequestControl) Reset()
- func (m *RequestControl) Size() (n int)
- func (m *RequestControl) String() string
- func (m *RequestControl) Unmarshal(dAtA []byte) error
- func (m *RequestControl) XXX_DiscardUnknown()
- func (m *RequestControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RequestControl) XXX_Merge(src proto.Message)
- func (m *RequestControl) XXX_Size() int
- func (m *RequestControl) XXX_Unmarshal(b []byte) error
- type RequestID
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) Marshal() (dAtA []byte, err error)
- func (m *Response) MarshalTo(dAtA []byte) (int, error)
- func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) Size() (n int)
- func (m *Response) String() string
- func (m *Response) Unmarshal(dAtA []byte) error
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type ResponseControl
- func (*ResponseControl) Descriptor() ([]byte, []int)
- func (m *ResponseControl) Marshal() (dAtA []byte, err error)
- func (m *ResponseControl) MarshalTo(dAtA []byte) (int, error)
- func (m *ResponseControl) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ResponseControl) ProtoMessage()
- func (m *ResponseControl) Reset()
- func (m *ResponseControl) Size() (n int)
- func (m *ResponseControl) String() string
- func (m *ResponseControl) Unmarshal(dAtA []byte) error
- func (m *ResponseControl) XXX_DiscardUnknown()
- func (m *ResponseControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResponseControl) XXX_Merge(src proto.Message)
- func (m *ResponseControl) XXX_Size() int
- func (m *ResponseControl) XXX_Unmarshal(b []byte) error
- type Responses
- func (*Responses) Descriptor() ([]byte, []int)
- func (m *Responses) Marshal() (dAtA []byte, err error)
- func (m *Responses) MarshalTo(dAtA []byte) (int, error)
- func (m *Responses) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Responses) ProtoMessage()
- func (m *Responses) Reset()
- func (m *Responses) Size() (n int)
- func (m *Responses) String() string
- func (m *Responses) Unmarshal(dAtA []byte) error
- func (m *Responses) XXX_DiscardUnknown()
- func (m *Responses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Responses) XXX_Merge(src proto.Message)
- func (m *Responses) XXX_Size() int
- func (m *Responses) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthPubsubcollect = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPubsubcollect = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPubsubcollect = fmt.Errorf("proto: unexpected end of group") )
View Source
var Msg_MsgType_name = map[int32]string{
0: "Unknown",
1: "Request",
2: "Response",
3: "Hit",
}
View Source
var Msg_MsgType_value = map[string]int32{
"Unknown": 0,
"Request": 1,
"Response": 2,
"Hit": 3,
}
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` }
func (*Error) Descriptor ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) XXX_DiscardUnknown ¶
func (m *Error) XXX_DiscardUnknown()
func (*Error) XXX_Marshal ¶
func (*Error) XXX_Unmarshal ¶
type Intermediate ¶
type Intermediate struct { // hit decides whether send back to the root node // if hit is true, means that the current node has the wanted answer. Hit bool `protobuf:"varint,1,opt,name=hit,proto3" json:"hit,omitempty"` // response payload, which will be assembled into a response // be aware that THIS IS NOT response.marshal() result Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // Error Message Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` }
func (*Intermediate) Descriptor ¶
func (*Intermediate) Descriptor() ([]byte, []int)
func (*Intermediate) Marshal ¶
func (m *Intermediate) Marshal() (dAtA []byte, err error)
func (*Intermediate) MarshalToSizedBuffer ¶
func (m *Intermediate) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Intermediate) ProtoMessage ¶
func (*Intermediate) ProtoMessage()
func (*Intermediate) Reset ¶
func (m *Intermediate) Reset()
func (*Intermediate) Size ¶
func (m *Intermediate) Size() (n int)
func (*Intermediate) String ¶
func (m *Intermediate) String() string
func (*Intermediate) Unmarshal ¶
func (m *Intermediate) Unmarshal(dAtA []byte) error
func (*Intermediate) XXX_DiscardUnknown ¶
func (m *Intermediate) XXX_DiscardUnknown()
func (*Intermediate) XXX_Marshal ¶
func (m *Intermediate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Intermediate) XXX_Merge ¶
func (m *Intermediate) XXX_Merge(src proto.Message)
func (*Intermediate) XXX_Size ¶
func (m *Intermediate) XXX_Size() int
func (*Intermediate) XXX_Unmarshal ¶
func (m *Intermediate) XXX_Unmarshal(b []byte) error
type Msg ¶
type Msg struct { Type Msg_MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.Msg_MsgType" json:"type,omitempty"` Request *Request `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` Response *Response `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` }
func (*Msg) Descriptor ¶
func (*Msg) ProtoMessage ¶
func (*Msg) ProtoMessage()
func (*Msg) XXX_DiscardUnknown ¶
func (m *Msg) XXX_DiscardUnknown()
func (*Msg) XXX_Unmarshal ¶
type Msg_MsgType ¶
type Msg_MsgType int32
const ( Msg_Unknown Msg_MsgType = 0 Msg_Request Msg_MsgType = 1 Msg_Response Msg_MsgType = 2 Msg_Hit Msg_MsgType = 3 )
func (Msg_MsgType) EnumDescriptor ¶
func (Msg_MsgType) EnumDescriptor() ([]byte, []int)
func (Msg_MsgType) String ¶
func (x Msg_MsgType) String() string
type Request ¶
type Request struct { // control is the routing messages. Control RequestControl `protobuf:"bytes,1,opt,name=control,proto3" json:"control"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` }
Request is the structure transmit in overlay network, to perform a broadcast query.
func (*Request) Descriptor ¶
func (*Request) MarshalToSizedBuffer ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type RequestControl ¶
type RequestControl struct { // requester is the peerid of the origin node Requester github_com_libp2p_go_libp2p_core_peer.ID `protobuf:"bytes,1,opt,name=requester,proto3,casttype=github.com/libp2p/go-libp2p/core/peer.ID" json:"requester,omitempty"` // sender is the node who gives you this request Sender github_com_libp2p_go_libp2p_core_peer.ID `protobuf:"bytes,2,opt,name=sender,proto3,casttype=github.com/libp2p/go-libp2p/core/peer.ID" json:"sender,omitempty"` // seqno is the sequence number helps to generate request id Seqno uint64 `protobuf:"varint,3,opt,name=seqno,proto3" json:"seqno,omitempty"` Hops uint32 `protobuf:"varint,4,opt,name=hops,proto3" json:"hops,omitempty"` Topic string `protobuf:"bytes,5,opt,name=topic,proto3" json:"topic,omitempty"` }
func (*RequestControl) Descriptor ¶
func (*RequestControl) Descriptor() ([]byte, []int)
func (*RequestControl) Marshal ¶
func (m *RequestControl) Marshal() (dAtA []byte, err error)
func (*RequestControl) MarshalToSizedBuffer ¶
func (m *RequestControl) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RequestControl) ProtoMessage ¶
func (*RequestControl) ProtoMessage()
func (*RequestControl) Reset ¶
func (m *RequestControl) Reset()
func (*RequestControl) Size ¶
func (m *RequestControl) Size() (n int)
func (*RequestControl) String ¶
func (m *RequestControl) String() string
func (*RequestControl) Unmarshal ¶
func (m *RequestControl) Unmarshal(dAtA []byte) error
func (*RequestControl) XXX_DiscardUnknown ¶
func (m *RequestControl) XXX_DiscardUnknown()
func (*RequestControl) XXX_Marshal ¶
func (m *RequestControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestControl) XXX_Merge ¶
func (m *RequestControl) XXX_Merge(src proto.Message)
func (*RequestControl) XXX_Size ¶
func (m *RequestControl) XXX_Size() int
func (*RequestControl) XXX_Unmarshal ¶
func (m *RequestControl) XXX_Unmarshal(b []byte) error
type Response ¶
type Response struct { // control is the routing messages. Control ResponseControl `protobuf:"bytes,1,opt,name=control,proto3" json:"control"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // Error Message Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` }
Response is the structure transmit in overlay network, to answer a broadcast query.
func (*Response) Descriptor ¶
func (*Response) MarshalToSizedBuffer ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type ResponseControl ¶
type ResponseControl struct { // response related request id. RequestId RequestID `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3,casttype=RequestID" json:"request_id,omitempty"` // requester is the node who send the request Requester github_com_libp2p_go_libp2p_core_peer.ID `protobuf:"bytes,2,opt,name=requester,proto3,casttype=github.com/libp2p/go-libp2p/core/peer.ID" json:"requester,omitempty"` // responser is the node who generate the current response Responser github_com_libp2p_go_libp2p_core_peer.ID `protobuf:"bytes,3,opt,name=responser,proto3,casttype=github.com/libp2p/go-libp2p/core/peer.ID" json:"responser,omitempty"` // sender is the node who send you this response Sender github_com_libp2p_go_libp2p_core_peer.ID `protobuf:"bytes,4,opt,name=sender,proto3,casttype=github.com/libp2p/go-libp2p/core/peer.ID" json:"sender,omitempty"` Topic string `protobuf:"bytes,5,opt,name=topic,proto3" json:"topic,omitempty"` }
func (*ResponseControl) Descriptor ¶
func (*ResponseControl) Descriptor() ([]byte, []int)
func (*ResponseControl) Marshal ¶
func (m *ResponseControl) Marshal() (dAtA []byte, err error)
func (*ResponseControl) MarshalToSizedBuffer ¶
func (m *ResponseControl) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ResponseControl) ProtoMessage ¶
func (*ResponseControl) ProtoMessage()
func (*ResponseControl) Reset ¶
func (m *ResponseControl) Reset()
func (*ResponseControl) Size ¶
func (m *ResponseControl) Size() (n int)
func (*ResponseControl) String ¶
func (m *ResponseControl) String() string
func (*ResponseControl) Unmarshal ¶
func (m *ResponseControl) Unmarshal(dAtA []byte) error
func (*ResponseControl) XXX_DiscardUnknown ¶
func (m *ResponseControl) XXX_DiscardUnknown()
func (*ResponseControl) XXX_Marshal ¶
func (m *ResponseControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResponseControl) XXX_Merge ¶
func (m *ResponseControl) XXX_Merge(src proto.Message)
func (*ResponseControl) XXX_Size ¶
func (m *ResponseControl) XXX_Size() int
func (*ResponseControl) XXX_Unmarshal ¶
func (m *ResponseControl) XXX_Unmarshal(b []byte) error
type Responses ¶
type Responses struct {
Responses []*Responses `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
}
func (*Responses) Descriptor ¶
func (*Responses) MarshalToSizedBuffer ¶
func (*Responses) ProtoMessage ¶
func (*Responses) ProtoMessage()
func (*Responses) XXX_DiscardUnknown ¶
func (m *Responses) XXX_DiscardUnknown()
func (*Responses) XXX_Marshal ¶
func (*Responses) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.