messages

package
v0.0.0-...-917d9ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 MarshalPingProtobuf(VerifyKey uint64) ([]byte, error)

func MarshalRequestProtobuf

func MarshalRequestProtobuf(sequenceID int32, timeout uint64, message proto.Message) ([]byte, error)

func MarshalResponseProtobuf

func MarshalResponseProtobuf(sequenceID int32, result proto.Message) ([]byte, error)

func UnMarshalProtobuf

func UnMarshalProtobuf(reader circbuf.Reader) (int, interface{}, error)

Types

type RpcDirect

type RpcDirect int

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) Descriptor() ([]byte, []int)

Deprecated: Use RpcError.ProtoReflect.Descriptor instead.

func (*RpcError) GetErr

func (x *RpcError) GetErr() string

func (*RpcError) ProtoMessage

func (*RpcError) ProtoMessage()

func (*RpcError) ProtoReflect

func (x *RpcError) ProtoReflect() protoreflect.Message

func (*RpcError) Reset

func (x *RpcError) Reset()

func (*RpcError) String

func (x *RpcError) String() string

type RpcHeader

type RpcHeader struct {
	Direct RpcDirect
	Length uint16
}

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 RpcQos

type RpcQos int

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL