rpcmsg

package
v0.0.0-...-aed9a31 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "Invalid",
		1: "Request",
		2: "Response",
		3: "Notify",
		4: "C2S",
		5: "S2C",
	}
	Type_value = map[string]int32{
		"Invalid":  0,
		"Request":  1,
		"Response": 2,
		"Notify":   3,
		"C2S":      4,
		"S2C":      5,
	}
)

Enum value maps for Type.

Functions

This section is empty.

Types

type PushGroupMsg

type PushGroupMsg struct {
	Data   []byte   `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Member []string `protobuf:"bytes,2,rep,name=member,proto3" json:"member,omitempty"`
	// contains filtered or unexported fields
}

func (*PushGroupMsg) Descriptor deprecated

func (*PushGroupMsg) Descriptor() ([]byte, []int)

Deprecated: Use PushGroupMsg.ProtoReflect.Descriptor instead.

func (*PushGroupMsg) GetData

func (x *PushGroupMsg) GetData() []byte

func (*PushGroupMsg) GetMember

func (x *PushGroupMsg) GetMember() []string

func (*PushGroupMsg) ProtoMessage

func (*PushGroupMsg) ProtoMessage()

func (*PushGroupMsg) ProtoReflect

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

func (*PushGroupMsg) Reset

func (x *PushGroupMsg) Reset()

func (*PushGroupMsg) String

func (x *PushGroupMsg) String() string

type RPCMessage

type RPCMessage struct {
	Type Type   `protobuf:"varint,1,opt,name=Type,proto3,enum=Type" json:"Type,omitempty"` // [required]
	MID  int32  `protobuf:"varint,2,opt,name=MID,proto3" json:"MID,omitempty"`             // msg ID 消息ID[用于c2s]
	HID  string `protobuf:"bytes,3,opt,name=HID,proto3" json:"HID,omitempty"`              // handlerID 内部消息处理器ID
	BUF  []byte `protobuf:"bytes,4,opt,name=BUF,proto3" json:"BUF,omitempty"`              // buffer 数据
	SID  string `protobuf:"bytes,5,opt,name=SID,proto3" json:"SID,omitempty"`              // sender ID 发送方ID [required]
	CID  string `protobuf:"bytes,6,opt,name=CID,proto3" json:"CID,omitempty"`              // connection ID 客户端连接ID [客户端消息时]
	UID  int32  `protobuf:"varint,7,opt,name=UID,proto3" json:"UID,omitempty"`             // user ID
	SEQ  int32  `protobuf:"varint,8,opt,name=SEQ,proto3" json:"SEQ,omitempty"`             // 请求ID,回执需要
	RID  string `protobuf:"bytes,9,opt,name=RID,proto3" json:"RID,omitempty"`              // 远程服务器ID
	Err  string `protobuf:"bytes,10,opt,name=Err,proto3" json:"Err,omitempty"`             // error
	// contains filtered or unexported fields
}

RPC 消息结构

func (*RPCMessage) Descriptor deprecated

func (*RPCMessage) Descriptor() ([]byte, []int)

Deprecated: Use RPCMessage.ProtoReflect.Descriptor instead.

func (*RPCMessage) GetBUF

func (x *RPCMessage) GetBUF() []byte

func (*RPCMessage) GetCID

func (x *RPCMessage) GetCID() string

func (*RPCMessage) GetErr

func (x *RPCMessage) GetErr() string

func (*RPCMessage) GetHID

func (x *RPCMessage) GetHID() string

func (*RPCMessage) GetMID

func (x *RPCMessage) GetMID() int32

func (*RPCMessage) GetRID

func (x *RPCMessage) GetRID() string

func (*RPCMessage) GetSEQ

func (x *RPCMessage) GetSEQ() int32

func (*RPCMessage) GetSID

func (x *RPCMessage) GetSID() string

func (*RPCMessage) GetType

func (x *RPCMessage) GetType() Type

func (*RPCMessage) GetUID

func (x *RPCMessage) GetUID() int32

func (*RPCMessage) ProtoMessage

func (*RPCMessage) ProtoMessage()

func (*RPCMessage) ProtoReflect

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

func (*RPCMessage) Reset

func (x *RPCMessage) Reset()

func (*RPCMessage) String

func (x *RPCMessage) String() string

type Type

type Type int32
const (
	Type_Invalid  Type = 0
	Type_Request  Type = 1
	Type_Response Type = 2
	Type_Notify   Type = 3
	Type_C2S      Type = 4 // ws客户端到后端服务器的消息
	Type_S2C      Type = 5 // 推送到ws客户端
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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