Documentation ¶
Index ¶
- Constants
- Variables
- func MarshalPingProtobuf(VerifyKey uint64) ([]byte, error)
- func MarshalRequestProtobuf(sequenceID int32, timeout uint64, message proto.Message) ([]byte, error)
- func MarshalResponseProtobuf(sequenceID int32, result proto.Message) ([]byte, error)
- func UnMarshalProtobuf(reader circbuf.Reader) (int, interface{}, error)
- type RpcDirect
- type RpcError
- type RpcHeader
- type RpcMsgMessage
- func (*RpcMsgMessage) Descriptor() ([]byte, []int)deprecated
- func (x *RpcMsgMessage) GetMessage() *anypb.Any
- func (x *RpcMsgMessage) GetQos() int32
- func (x *RpcMsgMessage) GetSequenceID() int32
- func (*RpcMsgMessage) ProtoMessage()
- func (x *RpcMsgMessage) ProtoReflect() protoreflect.Message
- func (x *RpcMsgMessage) Reset()
- func (x *RpcMsgMessage) String() string
- type RpcPingMessage
- type RpcQos
- type RpcRequestMessage
- func (*RpcRequestMessage) Descriptor() ([]byte, []int)deprecated
- func (x *RpcRequestMessage) GetForwardTime() uint64
- func (x *RpcRequestMessage) GetMessage() *anypb.Any
- func (x *RpcRequestMessage) GetSequenceID() int32
- func (x *RpcRequestMessage) GetTimeout() uint64
- func (*RpcRequestMessage) ProtoMessage()
- func (x *RpcRequestMessage) ProtoReflect() protoreflect.Message
- func (x *RpcRequestMessage) Reset()
- func (x *RpcRequestMessage) String() string
- type RpcResponseMessage
- func (*RpcResponseMessage) Descriptor() ([]byte, []int)deprecated
- func (x *RpcResponseMessage) GetResult() *anypb.Any
- func (x *RpcResponseMessage) GetSequenceID() int32
- func (*RpcResponseMessage) ProtoMessage()
- func (x *RpcResponseMessage) ProtoReflect() protoreflect.Message
- func (x *RpcResponseMessage) Reset()
- func (x *RpcResponseMessage) String() string
Constants ¶
View Source
const ( RpcRequest = iota RpcResponse RpcPing )
View Source
const ( // Success 成功 Success = int8(0) // FailTimeout 失败超时 FailTimeout = int8(-1) )
View Source
const (
RpcHeaderLength int = 3
)
Variables ¶
View Source
var File_rpc_msg_proto protoreflect.FileDescriptor
View Source
var File_rpc_ping_proto protoreflect.FileDescriptor
View Source
var File_rpc_request_proto protoreflect.FileDescriptor
View Source
var File_rpc_response_proto protoreflect.FileDescriptor
Functions ¶
func MarshalPingProtobuf ¶
func MarshalRequestProtobuf ¶
func MarshalResponseProtobuf ¶
Types ¶
type RpcError ¶
type RpcError struct { Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` // contains filtered or unexported fields }
func (*RpcError) Descriptor
deprecated
func (*RpcError) ProtoMessage ¶
func (*RpcError) ProtoMessage()
func (*RpcError) ProtoReflect ¶
func (x *RpcError) ProtoReflect() protoreflect.Message
type RpcMsgMessage ¶
type RpcMsgMessage struct { SequenceID int32 `protobuf:"varint,1,opt,name=SequenceID,proto3" json:"SequenceID,omitempty"` Qos int32 `protobuf:"varint,2,opt,name=Qos,proto3" json:"Qos,omitempty"` Message *anypb.Any `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"` // contains filtered or unexported fields }
func (*RpcMsgMessage) Descriptor
deprecated
func (*RpcMsgMessage) Descriptor() ([]byte, []int)
Deprecated: Use RpcMsgMessage.ProtoReflect.Descriptor instead.
func (*RpcMsgMessage) GetMessage ¶
func (x *RpcMsgMessage) GetMessage() *anypb.Any
func (*RpcMsgMessage) GetQos ¶
func (x *RpcMsgMessage) GetQos() int32
func (*RpcMsgMessage) GetSequenceID ¶
func (x *RpcMsgMessage) GetSequenceID() int32
func (*RpcMsgMessage) ProtoMessage ¶
func (*RpcMsgMessage) ProtoMessage()
func (*RpcMsgMessage) ProtoReflect ¶
func (x *RpcMsgMessage) ProtoReflect() protoreflect.Message
func (*RpcMsgMessage) Reset ¶
func (x *RpcMsgMessage) Reset()
func (*RpcMsgMessage) String ¶
func (x *RpcMsgMessage) String() string
type RpcPingMessage ¶
type RpcPingMessage struct { VerifyKey uint64 `protobuf:"fixed64,1,opt,name=VerifyKey,proto3" json:"VerifyKey,omitempty"` // contains filtered or unexported fields }
func (*RpcPingMessage) Descriptor
deprecated
func (*RpcPingMessage) Descriptor() ([]byte, []int)
Deprecated: Use RpcPingMessage.ProtoReflect.Descriptor instead.
func (*RpcPingMessage) GetVerifyKey ¶
func (x *RpcPingMessage) GetVerifyKey() uint64
func (*RpcPingMessage) ProtoMessage ¶
func (*RpcPingMessage) ProtoMessage()
func (*RpcPingMessage) ProtoReflect ¶
func (x *RpcPingMessage) ProtoReflect() protoreflect.Message
func (*RpcPingMessage) Reset ¶
func (x *RpcPingMessage) Reset()
func (*RpcPingMessage) String ¶
func (x *RpcPingMessage) String() string
type RpcRequestMessage ¶
type RpcRequestMessage struct { SequenceID int32 `protobuf:"varint,1,opt,name=SequenceID,proto3" json:"SequenceID,omitempty"` ForwardTime uint64 `protobuf:"fixed64,2,opt,name=ForwardTime,proto3" json:"ForwardTime,omitempty"` Timeout uint64 `protobuf:"fixed64,3,opt,name=Timeout,proto3" json:"Timeout,omitempty"` Message *anypb.Any `protobuf:"bytes,4,opt,name=Message,proto3" json:"Message,omitempty"` // contains filtered or unexported fields }
func (*RpcRequestMessage) Descriptor
deprecated
func (*RpcRequestMessage) Descriptor() ([]byte, []int)
Deprecated: Use RpcRequestMessage.ProtoReflect.Descriptor instead.
func (*RpcRequestMessage) GetForwardTime ¶
func (x *RpcRequestMessage) GetForwardTime() uint64
func (*RpcRequestMessage) GetMessage ¶
func (x *RpcRequestMessage) GetMessage() *anypb.Any
func (*RpcRequestMessage) GetSequenceID ¶
func (x *RpcRequestMessage) GetSequenceID() int32
func (*RpcRequestMessage) GetTimeout ¶
func (x *RpcRequestMessage) GetTimeout() uint64
func (*RpcRequestMessage) ProtoMessage ¶
func (*RpcRequestMessage) ProtoMessage()
func (*RpcRequestMessage) ProtoReflect ¶
func (x *RpcRequestMessage) ProtoReflect() protoreflect.Message
func (*RpcRequestMessage) Reset ¶
func (x *RpcRequestMessage) Reset()
func (*RpcRequestMessage) String ¶
func (x *RpcRequestMessage) String() string
type RpcResponseMessage ¶
type RpcResponseMessage struct { SequenceID int32 `protobuf:"varint,1,opt,name=SequenceID,proto3" json:"SequenceID,omitempty"` Result *anypb.Any `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"` // contains filtered or unexported fields }
func (*RpcResponseMessage) Descriptor
deprecated
func (*RpcResponseMessage) Descriptor() ([]byte, []int)
Deprecated: Use RpcResponseMessage.ProtoReflect.Descriptor instead.
func (*RpcResponseMessage) GetResult ¶
func (x *RpcResponseMessage) GetResult() *anypb.Any
func (*RpcResponseMessage) GetSequenceID ¶
func (x *RpcResponseMessage) GetSequenceID() int32
func (*RpcResponseMessage) ProtoMessage ¶
func (*RpcResponseMessage) ProtoMessage()
func (*RpcResponseMessage) ProtoReflect ¶
func (x *RpcResponseMessage) ProtoReflect() protoreflect.Message
func (*RpcResponseMessage) Reset ¶
func (x *RpcResponseMessage) Reset()
func (*RpcResponseMessage) String ¶
func (x *RpcResponseMessage) String() string
Click to show internal directories.
Click to hide internal directories.