Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGateServer(s grpc.ServiceRegistrar, srv GateServer)
- func RegisterNodeServer(s grpc.ServiceRegistrar, srv NodeServer)
- type BindReply
- type BindRequest
- type BroadcastReply
- type BroadcastRequest
- func (*BroadcastRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BroadcastRequest) GetKind() int32
- func (x *BroadcastRequest) GetMessage() *Message
- func (*BroadcastRequest) ProtoMessage()
- func (x *BroadcastRequest) ProtoReflect() protoreflect.Message
- func (x *BroadcastRequest) Reset()
- func (x *BroadcastRequest) String() string
- type DeliverReply
- type DeliverRequest
- func (*DeliverRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeliverRequest) GetCID() int64
- func (x *DeliverRequest) GetGID() string
- func (x *DeliverRequest) GetMessage() *Message
- func (x *DeliverRequest) GetNID() string
- func (x *DeliverRequest) GetUID() int64
- func (*DeliverRequest) ProtoMessage()
- func (x *DeliverRequest) ProtoReflect() protoreflect.Message
- func (x *DeliverRequest) Reset()
- func (x *DeliverRequest) String() string
- type DisconnectReply
- type DisconnectRequest
- func (*DisconnectRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DisconnectRequest) GetIsForce() bool
- func (x *DisconnectRequest) GetKind() int32
- func (x *DisconnectRequest) GetTarget() int64
- func (*DisconnectRequest) ProtoMessage()
- func (x *DisconnectRequest) ProtoReflect() protoreflect.Message
- func (x *DisconnectRequest) Reset()
- func (x *DisconnectRequest) String() string
- type GateClient
- type GateServer
- type GetIPReply
- type GetIPRequest
- func (*GetIPRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetIPRequest) GetKind() int32
- func (x *GetIPRequest) GetTarget() int64
- func (*GetIPRequest) ProtoMessage()
- func (x *GetIPRequest) ProtoReflect() protoreflect.Message
- func (x *GetIPRequest) Reset()
- func (x *GetIPRequest) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetBuffer() []byte
- func (x *Message) GetCategory() int32
- func (x *Message) GetProtoId() int32
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MulticastReply
- type MulticastRequest
- func (*MulticastRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MulticastRequest) GetKind() int32
- func (x *MulticastRequest) GetMessage() *Message
- func (x *MulticastRequest) GetTargets() []int64
- func (*MulticastRequest) ProtoMessage()
- func (x *MulticastRequest) ProtoReflect() protoreflect.Message
- func (x *MulticastRequest) Reset()
- func (x *MulticastRequest) String() string
- type NodeClient
- type NodeServer
- type PushReply
- type PushRequest
- func (*PushRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PushRequest) GetKind() int32
- func (x *PushRequest) GetMessage() *Message
- func (x *PushRequest) GetTarget() int64
- func (*PushRequest) ProtoMessage()
- func (x *PushRequest) ProtoReflect() protoreflect.Message
- func (x *PushRequest) Reset()
- func (x *PushRequest) String() string
- type StatReply
- type StatRequest
- type TriggerReply
- type TriggerRequest
- func (*TriggerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TriggerRequest) GetCID() int64
- func (x *TriggerRequest) GetEvent() int32
- func (x *TriggerRequest) GetGID() string
- func (x *TriggerRequest) GetUID() int64
- func (*TriggerRequest) ProtoMessage()
- func (x *TriggerRequest) ProtoReflect() protoreflect.Message
- func (x *TriggerRequest) Reset()
- func (x *TriggerRequest) String() string
- type UnbindReply
- type UnbindRequest
- type UnimplementedGateServer
- func (UnimplementedGateServer) Bind(context.Context, *BindRequest) (*BindReply, error)
- func (UnimplementedGateServer) Broadcast(context.Context, *BroadcastRequest) (*BroadcastReply, error)
- func (UnimplementedGateServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectReply, error)
- func (UnimplementedGateServer) GetIP(context.Context, *GetIPRequest) (*GetIPReply, error)
- func (UnimplementedGateServer) Multicast(context.Context, *MulticastRequest) (*MulticastReply, error)
- func (UnimplementedGateServer) Push(context.Context, *PushRequest) (*PushReply, error)
- func (UnimplementedGateServer) Stat(context.Context, *StatRequest) (*StatReply, error)
- func (UnimplementedGateServer) Unbind(context.Context, *UnbindRequest) (*UnbindReply, error)
- type UnimplementedNodeServer
- type UnsafeGateServer
- type UnsafeNodeServer
Constants ¶
const ( Gate_Bind_FullMethodName = "/pb.Gate/Bind" Gate_Unbind_FullMethodName = "/pb.Gate/Unbind" Gate_GetIP_FullMethodName = "/pb.Gate/GetIP" Gate_Push_FullMethodName = "/pb.Gate/Push" Gate_Multicast_FullMethodName = "/pb.Gate/Multicast" Gate_Broadcast_FullMethodName = "/pb.Gate/Broadcast" Gate_Stat_FullMethodName = "/pb.Gate/Stat" Gate_Disconnect_FullMethodName = "/pb.Gate/Disconnect" )
const ( Node_Trigger_FullMethodName = "/pb.Node/Trigger" Node_Deliver_FullMethodName = "/pb.Node/Deliver" )
Variables ¶
var File_gate_proto protoreflect.FileDescriptor
var File_message_proto protoreflect.FileDescriptor
var File_node_proto protoreflect.FileDescriptor
var Gate_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Gate", HandlerType: (*GateServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Bind", Handler: _Gate_Bind_Handler, }, { MethodName: "Unbind", Handler: _Gate_Unbind_Handler, }, { MethodName: "GetIP", Handler: _Gate_GetIP_Handler, }, { MethodName: "Push", Handler: _Gate_Push_Handler, }, { MethodName: "Multicast", Handler: _Gate_Multicast_Handler, }, { MethodName: "Broadcast", Handler: _Gate_Broadcast_Handler, }, { MethodName: "Stat", Handler: _Gate_Stat_Handler, }, { MethodName: "Disconnect", Handler: _Gate_Disconnect_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gate.proto", }
Gate_ServiceDesc is the grpc.ServiceDesc for Gate service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Node_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Node", HandlerType: (*NodeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Trigger", Handler: _Node_Trigger_Handler, }, { MethodName: "Deliver", Handler: _Node_Deliver_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "node.proto", }
Node_ServiceDesc is the grpc.ServiceDesc for Node service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGateServer ¶
func RegisterGateServer(s grpc.ServiceRegistrar, srv GateServer)
func RegisterNodeServer ¶
func RegisterNodeServer(s grpc.ServiceRegistrar, srv NodeServer)
Types ¶
type BindReply ¶
type BindReply struct {
// contains filtered or unexported fields
}
func (*BindReply) Descriptor
deprecated
func (*BindReply) ProtoMessage ¶
func (*BindReply) ProtoMessage()
func (*BindReply) ProtoReflect ¶
func (x *BindReply) ProtoReflect() protoreflect.Message
type BindRequest ¶
type BindRequest struct { CID int64 `protobuf:"varint,1,opt,name=CID,proto3" json:"CID,omitempty"` // 连接ID UID int64 `protobuf:"varint,2,opt,name=UID,proto3" json:"UID,omitempty"` // 用户ID // contains filtered or unexported fields }
func (*BindRequest) Descriptor
deprecated
func (*BindRequest) Descriptor() ([]byte, []int)
Deprecated: Use BindRequest.ProtoReflect.Descriptor instead.
func (*BindRequest) GetCID ¶
func (x *BindRequest) GetCID() int64
func (*BindRequest) GetUID ¶
func (x *BindRequest) GetUID() int64
func (*BindRequest) ProtoMessage ¶
func (*BindRequest) ProtoMessage()
func (*BindRequest) ProtoReflect ¶
func (x *BindRequest) ProtoReflect() protoreflect.Message
func (*BindRequest) Reset ¶
func (x *BindRequest) Reset()
func (*BindRequest) String ¶
func (x *BindRequest) String() string
type BroadcastReply ¶
type BroadcastReply struct { Total int64 `protobuf:"varint,1,opt,name=Total,proto3" json:"Total,omitempty"` // 广播数量 // contains filtered or unexported fields }
func (*BroadcastReply) Descriptor
deprecated
func (*BroadcastReply) Descriptor() ([]byte, []int)
Deprecated: Use BroadcastReply.ProtoReflect.Descriptor instead.
func (*BroadcastReply) GetTotal ¶
func (x *BroadcastReply) GetTotal() int64
func (*BroadcastReply) ProtoMessage ¶
func (*BroadcastReply) ProtoMessage()
func (*BroadcastReply) ProtoReflect ¶
func (x *BroadcastReply) ProtoReflect() protoreflect.Message
func (*BroadcastReply) Reset ¶
func (x *BroadcastReply) Reset()
func (*BroadcastReply) String ¶
func (x *BroadcastReply) String() string
type BroadcastRequest ¶
type BroadcastRequest struct { Kind int32 `protobuf:"varint,1,opt,name=Kind,proto3" json:"Kind,omitempty"` // 推送类型 1:CID 2:UID Message *Message `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"` // 消息 // contains filtered or unexported fields }
func (*BroadcastRequest) Descriptor
deprecated
func (*BroadcastRequest) Descriptor() ([]byte, []int)
Deprecated: Use BroadcastRequest.ProtoReflect.Descriptor instead.
func (*BroadcastRequest) GetKind ¶
func (x *BroadcastRequest) GetKind() int32
func (*BroadcastRequest) GetMessage ¶
func (x *BroadcastRequest) GetMessage() *Message
func (*BroadcastRequest) ProtoMessage ¶
func (*BroadcastRequest) ProtoMessage()
func (*BroadcastRequest) ProtoReflect ¶
func (x *BroadcastRequest) ProtoReflect() protoreflect.Message
func (*BroadcastRequest) Reset ¶
func (x *BroadcastRequest) Reset()
func (*BroadcastRequest) String ¶
func (x *BroadcastRequest) String() string
type DeliverReply ¶
type DeliverReply struct {
// contains filtered or unexported fields
}
func (*DeliverReply) Descriptor
deprecated
func (*DeliverReply) Descriptor() ([]byte, []int)
Deprecated: Use DeliverReply.ProtoReflect.Descriptor instead.
func (*DeliverReply) ProtoMessage ¶
func (*DeliverReply) ProtoMessage()
func (*DeliverReply) ProtoReflect ¶
func (x *DeliverReply) ProtoReflect() protoreflect.Message
func (*DeliverReply) Reset ¶
func (x *DeliverReply) Reset()
func (*DeliverReply) String ¶
func (x *DeliverReply) String() string
type DeliverRequest ¶
type DeliverRequest struct { GID string `protobuf:"bytes,1,opt,name=GID,proto3" json:"GID,omitempty"` // 网关ID NID string `protobuf:"bytes,2,opt,name=NID,proto3" json:"NID,omitempty"` // 节点ID CID int64 `protobuf:"varint,3,opt,name=CID,proto3" json:"CID,omitempty"` // 连接ID UID int64 `protobuf:"varint,4,opt,name=UID,proto3" json:"UID,omitempty"` // 用户ID Message *Message `protobuf:"bytes,5,opt,name=Message,proto3" json:"Message,omitempty"` // 消息 // contains filtered or unexported fields }
func (*DeliverRequest) Descriptor
deprecated
func (*DeliverRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeliverRequest.ProtoReflect.Descriptor instead.
func (*DeliverRequest) GetCID ¶
func (x *DeliverRequest) GetCID() int64
func (*DeliverRequest) GetGID ¶
func (x *DeliverRequest) GetGID() string
func (*DeliverRequest) GetMessage ¶
func (x *DeliverRequest) GetMessage() *Message
func (*DeliverRequest) GetNID ¶
func (x *DeliverRequest) GetNID() string
func (*DeliverRequest) GetUID ¶
func (x *DeliverRequest) GetUID() int64
func (*DeliverRequest) ProtoMessage ¶
func (*DeliverRequest) ProtoMessage()
func (*DeliverRequest) ProtoReflect ¶
func (x *DeliverRequest) ProtoReflect() protoreflect.Message
func (*DeliverRequest) Reset ¶
func (x *DeliverRequest) Reset()
func (*DeliverRequest) String ¶
func (x *DeliverRequest) String() string
type DisconnectReply ¶
type DisconnectReply struct {
// contains filtered or unexported fields
}
func (*DisconnectReply) Descriptor
deprecated
func (*DisconnectReply) Descriptor() ([]byte, []int)
Deprecated: Use DisconnectReply.ProtoReflect.Descriptor instead.
func (*DisconnectReply) ProtoMessage ¶
func (*DisconnectReply) ProtoMessage()
func (*DisconnectReply) ProtoReflect ¶
func (x *DisconnectReply) ProtoReflect() protoreflect.Message
func (*DisconnectReply) Reset ¶
func (x *DisconnectReply) Reset()
func (*DisconnectReply) String ¶
func (x *DisconnectReply) String() string
type DisconnectRequest ¶
type DisconnectRequest struct { Kind int32 `protobuf:"varint,1,opt,name=Kind,proto3" json:"Kind,omitempty"` // 推送类型 1:CID 2:UID Target int64 `protobuf:"varint,2,opt,name=Target,proto3" json:"Target,omitempty"` // 推送目标 IsForce bool `protobuf:"varint,3,opt,name=IsForce,proto3" json:"IsForce,omitempty"` // 是否强制断开连接 // contains filtered or unexported fields }
func (*DisconnectRequest) Descriptor
deprecated
func (*DisconnectRequest) Descriptor() ([]byte, []int)
Deprecated: Use DisconnectRequest.ProtoReflect.Descriptor instead.
func (*DisconnectRequest) GetIsForce ¶
func (x *DisconnectRequest) GetIsForce() bool
func (*DisconnectRequest) GetKind ¶
func (x *DisconnectRequest) GetKind() int32
func (*DisconnectRequest) GetTarget ¶
func (x *DisconnectRequest) GetTarget() int64
func (*DisconnectRequest) ProtoMessage ¶
func (*DisconnectRequest) ProtoMessage()
func (*DisconnectRequest) ProtoReflect ¶
func (x *DisconnectRequest) ProtoReflect() protoreflect.Message
func (*DisconnectRequest) Reset ¶
func (x *DisconnectRequest) Reset()
func (*DisconnectRequest) String ¶
func (x *DisconnectRequest) String() string
type GateClient ¶
type GateClient interface { // 绑定用户与连接 Bind(ctx context.Context, in *BindRequest, opts ...grpc.CallOption) (*BindReply, error) // 解绑用户与连接 Unbind(ctx context.Context, in *UnbindRequest, opts ...grpc.CallOption) (*UnbindReply, error) // 获取客户端IP GetIP(ctx context.Context, in *GetIPRequest, opts ...grpc.CallOption) (*GetIPReply, error) // 推送消息 Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushReply, error) // 推送组播消息 Multicast(ctx context.Context, in *MulticastRequest, opts ...grpc.CallOption) (*MulticastReply, error) // 推送广播消息 Broadcast(ctx context.Context, in *BroadcastRequest, opts ...grpc.CallOption) (*BroadcastReply, error) // 推送广播消息 Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatReply, error) // 断开连接 Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*DisconnectReply, error) }
GateClient is the client API for Gate service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGateClient ¶
func NewGateClient(cc grpc.ClientConnInterface) GateClient
type GateServer ¶
type GateServer interface { // 绑定用户与连接 Bind(context.Context, *BindRequest) (*BindReply, error) // 解绑用户与连接 Unbind(context.Context, *UnbindRequest) (*UnbindReply, error) // 获取客户端IP GetIP(context.Context, *GetIPRequest) (*GetIPReply, error) // 推送消息 Push(context.Context, *PushRequest) (*PushReply, error) // 推送组播消息 Multicast(context.Context, *MulticastRequest) (*MulticastReply, error) // 推送广播消息 Broadcast(context.Context, *BroadcastRequest) (*BroadcastReply, error) // 推送广播消息 Stat(context.Context, *StatRequest) (*StatReply, error) // 断开连接 Disconnect(context.Context, *DisconnectRequest) (*DisconnectReply, error) // contains filtered or unexported methods }
GateServer is the server API for Gate service. All implementations must embed UnimplementedGateServer for forward compatibility
type GetIPReply ¶
type GetIPReply struct { IP string `protobuf:"bytes,1,opt,name=IP,proto3" json:"IP,omitempty"` // IP地址 // contains filtered or unexported fields }
func (*GetIPReply) Descriptor
deprecated
func (*GetIPReply) Descriptor() ([]byte, []int)
Deprecated: Use GetIPReply.ProtoReflect.Descriptor instead.
func (*GetIPReply) GetIP ¶
func (x *GetIPReply) GetIP() string
func (*GetIPReply) ProtoMessage ¶
func (*GetIPReply) ProtoMessage()
func (*GetIPReply) ProtoReflect ¶
func (x *GetIPReply) ProtoReflect() protoreflect.Message
func (*GetIPReply) Reset ¶
func (x *GetIPReply) Reset()
func (*GetIPReply) String ¶
func (x *GetIPReply) String() string
type GetIPRequest ¶
type GetIPRequest struct { Kind int32 `protobuf:"varint,1,opt,name=Kind,proto3" json:"Kind,omitempty"` // 推送类型 1:CID 2:UID Target int64 `protobuf:"varint,2,opt,name=Target,proto3" json:"Target,omitempty"` // 推送目标 // contains filtered or unexported fields }
func (*GetIPRequest) Descriptor
deprecated
func (*GetIPRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetIPRequest.ProtoReflect.Descriptor instead.
func (*GetIPRequest) GetKind ¶
func (x *GetIPRequest) GetKind() int32
func (*GetIPRequest) GetTarget ¶
func (x *GetIPRequest) GetTarget() int64
func (*GetIPRequest) ProtoMessage ¶
func (*GetIPRequest) ProtoMessage()
func (*GetIPRequest) ProtoReflect ¶
func (x *GetIPRequest) ProtoReflect() protoreflect.Message
func (*GetIPRequest) Reset ¶
func (x *GetIPRequest) Reset()
func (*GetIPRequest) String ¶
func (x *GetIPRequest) String() string
type Message ¶
type Message struct { ProtoId int32 `protobuf:"varint,1,opt,name=ProtoId,proto3" json:"ProtoId,omitempty"` // 路由 Category int32 `protobuf:"varint,2,opt,name=Category,proto3" json:"Category,omitempty"` // 序列号 Buffer []byte `protobuf:"bytes,3,opt,name=Buffer,proto3" json:"Buffer,omitempty"` // 消息内容 // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetCategory ¶
func (*Message) GetProtoId ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type MulticastReply ¶
type MulticastReply struct { Total int64 `protobuf:"varint,1,opt,name=Total,proto3" json:"Total,omitempty"` // 组播数量 // contains filtered or unexported fields }
func (*MulticastReply) Descriptor
deprecated
func (*MulticastReply) Descriptor() ([]byte, []int)
Deprecated: Use MulticastReply.ProtoReflect.Descriptor instead.
func (*MulticastReply) GetTotal ¶
func (x *MulticastReply) GetTotal() int64
func (*MulticastReply) ProtoMessage ¶
func (*MulticastReply) ProtoMessage()
func (*MulticastReply) ProtoReflect ¶
func (x *MulticastReply) ProtoReflect() protoreflect.Message
func (*MulticastReply) Reset ¶
func (x *MulticastReply) Reset()
func (*MulticastReply) String ¶
func (x *MulticastReply) String() string
type MulticastRequest ¶
type MulticastRequest struct { Kind int32 `protobuf:"varint,1,opt,name=Kind,proto3" json:"Kind,omitempty"` // 推送类型 1:CID 2:UID Targets []int64 `protobuf:"varint,2,rep,packed,name=Targets,proto3" json:"Targets,omitempty"` // 推送目标 Message *Message `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"` // 消息 // contains filtered or unexported fields }
func (*MulticastRequest) Descriptor
deprecated
func (*MulticastRequest) Descriptor() ([]byte, []int)
Deprecated: Use MulticastRequest.ProtoReflect.Descriptor instead.
func (*MulticastRequest) GetKind ¶
func (x *MulticastRequest) GetKind() int32
func (*MulticastRequest) GetMessage ¶
func (x *MulticastRequest) GetMessage() *Message
func (*MulticastRequest) GetTargets ¶
func (x *MulticastRequest) GetTargets() []int64
func (*MulticastRequest) ProtoMessage ¶
func (*MulticastRequest) ProtoMessage()
func (*MulticastRequest) ProtoReflect ¶
func (x *MulticastRequest) ProtoReflect() protoreflect.Message
func (*MulticastRequest) Reset ¶
func (x *MulticastRequest) Reset()
func (*MulticastRequest) String ¶
func (x *MulticastRequest) String() string
type NodeClient ¶
type NodeClient interface { // 触发事件 Trigger(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*TriggerReply, error) // 投递消息 Deliver(ctx context.Context, in *DeliverRequest, opts ...grpc.CallOption) (*DeliverReply, error) }
NodeClient is the client API for Node service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewNodeClient ¶
func NewNodeClient(cc grpc.ClientConnInterface) NodeClient
type NodeServer ¶
type NodeServer interface { // 触发事件 Trigger(context.Context, *TriggerRequest) (*TriggerReply, error) // 投递消息 Deliver(context.Context, *DeliverRequest) (*DeliverReply, error) // contains filtered or unexported methods }
NodeServer is the server API for Node service. All implementations must embed UnimplementedNodeServer for forward compatibility
type PushReply ¶
type PushReply struct {
// contains filtered or unexported fields
}
func (*PushReply) Descriptor
deprecated
func (*PushReply) ProtoMessage ¶
func (*PushReply) ProtoMessage()
func (*PushReply) ProtoReflect ¶
func (x *PushReply) ProtoReflect() protoreflect.Message
type PushRequest ¶
type PushRequest struct { Kind int32 `protobuf:"varint,1,opt,name=Kind,proto3" json:"Kind,omitempty"` // 推送类型 1:CID 2:UID Target int64 `protobuf:"varint,2,opt,name=Target,proto3" json:"Target,omitempty"` // 推送目标 Message *Message `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"` // 消息 // contains filtered or unexported fields }
func (*PushRequest) Descriptor
deprecated
func (*PushRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.
func (*PushRequest) GetKind ¶
func (x *PushRequest) GetKind() int32
func (*PushRequest) GetMessage ¶
func (x *PushRequest) GetMessage() *Message
func (*PushRequest) GetTarget ¶
func (x *PushRequest) GetTarget() int64
func (*PushRequest) ProtoMessage ¶
func (*PushRequest) ProtoMessage()
func (*PushRequest) ProtoReflect ¶
func (x *PushRequest) ProtoReflect() protoreflect.Message
func (*PushRequest) Reset ¶
func (x *PushRequest) Reset()
func (*PushRequest) String ¶
func (x *PushRequest) String() string
type StatReply ¶
type StatReply struct { Total int64 `protobuf:"varint,1,opt,name=Total,proto3" json:"Total,omitempty"` // 会话数量 // contains filtered or unexported fields }
func (*StatReply) Descriptor
deprecated
func (*StatReply) ProtoMessage ¶
func (*StatReply) ProtoMessage()
func (*StatReply) ProtoReflect ¶
func (x *StatReply) ProtoReflect() protoreflect.Message
type StatRequest ¶
type StatRequest struct { Kind int32 `protobuf:"varint,1,opt,name=Kind,proto3" json:"Kind,omitempty"` // 推送类型 1:CID 2:UID // contains filtered or unexported fields }
func (*StatRequest) Descriptor
deprecated
func (*StatRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatRequest.ProtoReflect.Descriptor instead.
func (*StatRequest) GetKind ¶
func (x *StatRequest) GetKind() int32
func (*StatRequest) ProtoMessage ¶
func (*StatRequest) ProtoMessage()
func (*StatRequest) ProtoReflect ¶
func (x *StatRequest) ProtoReflect() protoreflect.Message
func (*StatRequest) Reset ¶
func (x *StatRequest) Reset()
func (*StatRequest) String ¶
func (x *StatRequest) String() string
type TriggerReply ¶
type TriggerReply struct {
// contains filtered or unexported fields
}
func (*TriggerReply) Descriptor
deprecated
func (*TriggerReply) Descriptor() ([]byte, []int)
Deprecated: Use TriggerReply.ProtoReflect.Descriptor instead.
func (*TriggerReply) ProtoMessage ¶
func (*TriggerReply) ProtoMessage()
func (*TriggerReply) ProtoReflect ¶
func (x *TriggerReply) ProtoReflect() protoreflect.Message
func (*TriggerReply) Reset ¶
func (x *TriggerReply) Reset()
func (*TriggerReply) String ¶
func (x *TriggerReply) String() string
type TriggerRequest ¶
type TriggerRequest struct { Event int32 `protobuf:"varint,1,opt,name=Event,proto3" json:"Event,omitempty"` // 事件 GID string `protobuf:"bytes,2,opt,name=GID,proto3" json:"GID,omitempty"` // 网关ID CID int64 `protobuf:"varint,3,opt,name=CID,proto3" json:"CID,omitempty"` // 连接ID UID int64 `protobuf:"varint,4,opt,name=UID,proto3" json:"UID,omitempty"` // 用户ID // contains filtered or unexported fields }
func (*TriggerRequest) Descriptor
deprecated
func (*TriggerRequest) Descriptor() ([]byte, []int)
Deprecated: Use TriggerRequest.ProtoReflect.Descriptor instead.
func (*TriggerRequest) GetCID ¶
func (x *TriggerRequest) GetCID() int64
func (*TriggerRequest) GetEvent ¶
func (x *TriggerRequest) GetEvent() int32
func (*TriggerRequest) GetGID ¶
func (x *TriggerRequest) GetGID() string
func (*TriggerRequest) GetUID ¶
func (x *TriggerRequest) GetUID() int64
func (*TriggerRequest) ProtoMessage ¶
func (*TriggerRequest) ProtoMessage()
func (*TriggerRequest) ProtoReflect ¶
func (x *TriggerRequest) ProtoReflect() protoreflect.Message
func (*TriggerRequest) Reset ¶
func (x *TriggerRequest) Reset()
func (*TriggerRequest) String ¶
func (x *TriggerRequest) String() string
type UnbindReply ¶
type UnbindReply struct {
// contains filtered or unexported fields
}
func (*UnbindReply) Descriptor
deprecated
func (*UnbindReply) Descriptor() ([]byte, []int)
Deprecated: Use UnbindReply.ProtoReflect.Descriptor instead.
func (*UnbindReply) ProtoMessage ¶
func (*UnbindReply) ProtoMessage()
func (*UnbindReply) ProtoReflect ¶
func (x *UnbindReply) ProtoReflect() protoreflect.Message
func (*UnbindReply) Reset ¶
func (x *UnbindReply) Reset()
func (*UnbindReply) String ¶
func (x *UnbindReply) String() string
type UnbindRequest ¶
type UnbindRequest struct { UID int64 `protobuf:"varint,1,opt,name=UID,proto3" json:"UID,omitempty"` // 用户ID // contains filtered or unexported fields }
func (*UnbindRequest) Descriptor
deprecated
func (*UnbindRequest) Descriptor() ([]byte, []int)
Deprecated: Use UnbindRequest.ProtoReflect.Descriptor instead.
func (*UnbindRequest) GetUID ¶
func (x *UnbindRequest) GetUID() int64
func (*UnbindRequest) ProtoMessage ¶
func (*UnbindRequest) ProtoMessage()
func (*UnbindRequest) ProtoReflect ¶
func (x *UnbindRequest) ProtoReflect() protoreflect.Message
func (*UnbindRequest) Reset ¶
func (x *UnbindRequest) Reset()
func (*UnbindRequest) String ¶
func (x *UnbindRequest) String() string
type UnimplementedGateServer ¶
type UnimplementedGateServer struct { }
UnimplementedGateServer must be embedded to have forward compatible implementations.
func (UnimplementedGateServer) Bind ¶
func (UnimplementedGateServer) Bind(context.Context, *BindRequest) (*BindReply, error)
func (UnimplementedGateServer) Broadcast ¶
func (UnimplementedGateServer) Broadcast(context.Context, *BroadcastRequest) (*BroadcastReply, error)
func (UnimplementedGateServer) Disconnect ¶
func (UnimplementedGateServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectReply, error)
func (UnimplementedGateServer) GetIP ¶
func (UnimplementedGateServer) GetIP(context.Context, *GetIPRequest) (*GetIPReply, error)
func (UnimplementedGateServer) Multicast ¶
func (UnimplementedGateServer) Multicast(context.Context, *MulticastRequest) (*MulticastReply, error)
func (UnimplementedGateServer) Push ¶
func (UnimplementedGateServer) Push(context.Context, *PushRequest) (*PushReply, error)
func (UnimplementedGateServer) Stat ¶
func (UnimplementedGateServer) Stat(context.Context, *StatRequest) (*StatReply, error)
func (UnimplementedGateServer) Unbind ¶
func (UnimplementedGateServer) Unbind(context.Context, *UnbindRequest) (*UnbindReply, error)
type UnimplementedNodeServer ¶
type UnimplementedNodeServer struct { }
UnimplementedNodeServer must be embedded to have forward compatible implementations.
func (UnimplementedNodeServer) Deliver ¶
func (UnimplementedNodeServer) Deliver(context.Context, *DeliverRequest) (*DeliverReply, error)
func (UnimplementedNodeServer) Trigger ¶
func (UnimplementedNodeServer) Trigger(context.Context, *TriggerRequest) (*TriggerReply, error)
type UnsafeGateServer ¶
type UnsafeGateServer interface {
// contains filtered or unexported methods
}
UnsafeGateServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GateServer will result in compilation errors.
type UnsafeNodeServer ¶
type UnsafeNodeServer interface {
// contains filtered or unexported methods
}
UnsafeNodeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeServer will result in compilation errors.