Documentation
¶
Index ¶
- Variables
- type ErrorResponse
- func (*ErrorResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ErrorResponse) GetCode() int32
- func (x *ErrorResponse) GetMessage() string
- func (*ErrorResponse) ProtoMessage()
- func (x *ErrorResponse) ProtoReflect() protoreflect.Message
- func (x *ErrorResponse) Reset()
- func (x *ErrorResponse) String() string
- type KickMessage
- type LocalMessage
- func (*LocalMessage) Descriptor() ([]byte, []int)deprecated
- func (x *LocalMessage) GetData() []byte
- func (x *LocalMessage) GetIsError() bool
- func (x *LocalMessage) GetMsgId() int32
- func (x *LocalMessage) GetMsgType() int32
- func (x *LocalMessage) GetRoute() string
- func (x *LocalMessage) GetSession() *Session
- func (*LocalMessage) ProtoMessage()
- func (x *LocalMessage) ProtoReflect() protoreflect.Message
- func (x *LocalMessage) Reset()
- func (x *LocalMessage) String() string
- type Member
- func (*Member) Descriptor() ([]byte, []int)deprecated
- func (x *Member) GetAddress() string
- func (x *Member) GetNodeId() string
- func (x *Member) GetNodeType() string
- func (x *Member) GetSettings() map[string]string
- func (*Member) ProtoMessage()
- func (x *Member) ProtoReflect() protoreflect.Message
- func (x *Member) Reset()
- func (x *Member) String() string
- type MemberList
- type PushMessage
- func (*PushMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PushMessage) GetData() []byte
- func (x *PushMessage) GetRoute() string
- func (x *PushMessage) GetUid() int64
- func (*PushMessage) ProtoMessage()
- func (x *PushMessage) ProtoReflect() protoreflect.Message
- func (x *PushMessage) Reset()
- func (x *PushMessage) String() string
- type RemoteMessage
- func (*RemoteMessage) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteMessage) GetData() []byte
- func (x *RemoteMessage) GetRoute() string
- func (*RemoteMessage) ProtoMessage()
- func (x *RemoteMessage) ProtoReflect() protoreflect.Message
- func (x *RemoteMessage) Reset()
- func (x *RemoteMessage) String() string
- type Response
- type Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetData() map[string]string
- func (x *Session) GetFrontendId() string
- func (x *Session) GetUid() int64
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_cluster_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶ added in v1.1.16
type ErrorResponse struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ErrorResponse) Descriptor
deprecated
added in
v1.1.16
func (*ErrorResponse) Descriptor() ([]byte, []int)
Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
func (*ErrorResponse) GetCode ¶ added in v1.1.16
func (x *ErrorResponse) GetCode() int32
func (*ErrorResponse) GetMessage ¶ added in v1.1.16
func (x *ErrorResponse) GetMessage() string
func (*ErrorResponse) ProtoMessage ¶ added in v1.1.16
func (*ErrorResponse) ProtoMessage()
func (*ErrorResponse) ProtoReflect ¶ added in v1.1.16
func (x *ErrorResponse) ProtoReflect() protoreflect.Message
func (*ErrorResponse) Reset ¶ added in v1.1.16
func (x *ErrorResponse) Reset()
func (*ErrorResponse) String ¶ added in v1.1.16
func (x *ErrorResponse) String() string
type KickMessage ¶
type KickMessage struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 踢下线的uid Reason []byte `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` // 原因自定义数据 // contains filtered or unexported fields }
func (*KickMessage) Descriptor
deprecated
func (*KickMessage) Descriptor() ([]byte, []int)
Deprecated: Use KickMessage.ProtoReflect.Descriptor instead.
func (*KickMessage) GetReason ¶
func (x *KickMessage) GetReason() []byte
func (*KickMessage) GetUid ¶
func (x *KickMessage) GetUid() int64
func (*KickMessage) ProtoMessage ¶
func (*KickMessage) ProtoMessage()
func (*KickMessage) ProtoReflect ¶
func (x *KickMessage) ProtoReflect() protoreflect.Message
func (*KickMessage) Reset ¶
func (x *KickMessage) Reset()
func (*KickMessage) String ¶
func (x *KickMessage) String() string
type LocalMessage ¶
type LocalMessage struct { Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` // session MsgType int32 `protobuf:"varint,3,opt,name=msgType,proto3" json:"msgType,omitempty"` // 消息类型(request,notify,response,push) MsgId int32 `protobuf:"varint,4,opt,name=msgId,proto3" json:"msgId,omitempty"` // 消息序号id Route string `protobuf:"bytes,5,opt,name=route,proto3" json:"route,omitempty"` // 路由 IsError bool `protobuf:"varint,6,opt,name=isError,proto3" json:"isError,omitempty"` // 是否返回错误 Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` // 自定义数据 // contains filtered or unexported fields }
本地消息结构 (适用于网关消息转发到当前节点执行localHandle的逻辑,也可手工构造调用)
func (*LocalMessage) Descriptor
deprecated
func (*LocalMessage) Descriptor() ([]byte, []int)
Deprecated: Use LocalMessage.ProtoReflect.Descriptor instead.
func (*LocalMessage) GetData ¶
func (x *LocalMessage) GetData() []byte
func (*LocalMessage) GetIsError ¶
func (x *LocalMessage) GetIsError() bool
func (*LocalMessage) GetMsgId ¶
func (x *LocalMessage) GetMsgId() int32
func (*LocalMessage) GetMsgType ¶
func (x *LocalMessage) GetMsgType() int32
func (*LocalMessage) GetRoute ¶
func (x *LocalMessage) GetRoute() string
func (*LocalMessage) GetSession ¶ added in v1.1.17
func (x *LocalMessage) GetSession() *Session
func (*LocalMessage) ProtoMessage ¶
func (*LocalMessage) ProtoMessage()
func (*LocalMessage) ProtoReflect ¶
func (x *LocalMessage) ProtoReflect() protoreflect.Message
func (*LocalMessage) Reset ¶
func (x *LocalMessage) Reset()
func (*LocalMessage) String ¶
func (x *LocalMessage) String() string
type Member ¶
type Member struct { NodeId string `protobuf:"bytes,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"` // 节点id NodeType string `protobuf:"bytes,2,opt,name=nodeType,proto3" json:"nodeType,omitempty"` // 节点类型 Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` // rpc连接地址 Settings map[string]string `` // 节点配置参数 /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
成员结构
func (*Member) Descriptor
deprecated
func (*Member) GetAddress ¶
func (*Member) GetNodeType ¶
func (*Member) GetSettings ¶
func (*Member) ProtoMessage ¶
func (*Member) ProtoMessage()
func (*Member) ProtoReflect ¶
func (x *Member) ProtoReflect() protoreflect.Message
type MemberList ¶
type MemberList struct { List []*Member `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
成员列表结构
func (*MemberList) Descriptor
deprecated
func (*MemberList) Descriptor() ([]byte, []int)
Deprecated: Use MemberList.ProtoReflect.Descriptor instead.
func (*MemberList) GetList ¶
func (x *MemberList) GetList() []*Member
func (*MemberList) ProtoMessage ¶
func (*MemberList) ProtoMessage()
func (*MemberList) ProtoReflect ¶
func (x *MemberList) ProtoReflect() protoreflect.Message
func (*MemberList) Reset ¶
func (x *MemberList) Reset()
func (*MemberList) String ¶
func (x *MemberList) String() string
type PushMessage ¶
type PushMessage struct { Route string `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"` // 路由 Uid int64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"` // session uid Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // 自定义数据 // contains filtered or unexported fields }
推送消息结构(推送到网关转发到用户客户端)
func (*PushMessage) Descriptor
deprecated
func (*PushMessage) Descriptor() ([]byte, []int)
Deprecated: Use PushMessage.ProtoReflect.Descriptor instead.
func (*PushMessage) GetData ¶
func (x *PushMessage) GetData() []byte
func (*PushMessage) GetRoute ¶
func (x *PushMessage) GetRoute() string
func (*PushMessage) GetUid ¶
func (x *PushMessage) GetUid() int64
func (*PushMessage) ProtoMessage ¶
func (*PushMessage) ProtoMessage()
func (*PushMessage) ProtoReflect ¶
func (x *PushMessage) ProtoReflect() protoreflect.Message
func (*PushMessage) Reset ¶
func (x *PushMessage) Reset()
func (*PushMessage) String ¶
func (x *PushMessage) String() string
type RemoteMessage ¶
type RemoteMessage struct { Route string `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"` // 路由 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // 自定义数据 // contains filtered or unexported fields }
远程消息结构(用于开发中手动构造调用)
func (*RemoteMessage) Descriptor
deprecated
func (*RemoteMessage) Descriptor() ([]byte, []int)
Deprecated: Use RemoteMessage.ProtoReflect.Descriptor instead.
func (*RemoteMessage) GetData ¶
func (x *RemoteMessage) GetData() []byte
func (*RemoteMessage) GetRoute ¶
func (x *RemoteMessage) GetRoute() string
func (*RemoteMessage) ProtoMessage ¶
func (*RemoteMessage) ProtoMessage()
func (*RemoteMessage) ProtoReflect ¶
func (x *RemoteMessage) ProtoReflect() protoreflect.Message
func (*RemoteMessage) Reset ¶
func (x *RemoteMessage) Reset()
func (*RemoteMessage) String ¶
func (x *RemoteMessage) String() string
type Response ¶
type Response struct { Error *ErrorResponse `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // 自定义数据 // contains filtered or unexported fields }
响应结构
func (*Response) Descriptor
deprecated
func (*Response) GetError ¶ added in v1.1.17
func (x *Response) GetError() *ErrorResponse
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Session ¶
type Session struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // uid FrontendId string `protobuf:"bytes,2,opt,name=frontendId,proto3" json:"frontendId,omitempty"` // 前端节点id Data map[string]string `` // 附带的参数 /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
Session
func (*Session) Descriptor
deprecated
func (*Session) GetFrontendId ¶ added in v1.1.17
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.