Documentation ¶
Overview ¶
*
- Created by lock
- Date: 2019-08-09
- Time: 18:25
*
- Created by lock
- Date: 2019-08-12
- Time: 15:44
*
- Created by lock
- Date: 2019-08-12
- Time: 15:52
Index ¶
- Variables
- type Logic
- func (logic *Logic) InitPublishRedisClient() (err error)
- func (logic *Logic) InitRpcServer() (err error)
- func (logic *Logic) RedisPublishChannel(serverId string, toUserId int, msg []byte) (err error)
- func (logic *Logic) RedisPublishRoomInfo(roomId int, count int, RoomUserInfo map[string]string, msg []byte) (err error)
- func (logic *Logic) RedisPushRoomCount(roomId int, count int) (err error)
- func (logic *Logic) RedisPushRoomInfo(roomId int, count int, roomUserInfo map[string]string) (err error)
- func (logic *Logic) Run()
- type RpcLogic
- func (rpc *RpcLogic) CheckAuth(ctx context.Context, args *proto.CheckAuthRequest, ...) (err error)
- func (rpc *RpcLogic) Connect(ctx context.Context, args *proto.ConnectRequest, reply *proto.ConnectReply) (err error)
- func (rpc *RpcLogic) Count(ctx context.Context, args *proto.Send, reply *proto.SuccessReply) (err error)
- func (rpc *RpcLogic) DisConnect(ctx context.Context, args *proto.DisConnectRequest, ...) (err error)
- func (rpc *RpcLogic) GetRoomInfo(ctx context.Context, args *proto.Send, reply *proto.SuccessReply) (err error)
- func (rpc *RpcLogic) GetUserInfoByUserId(ctx context.Context, args *proto.GetUserInfoRequest, ...) (err error)
- func (rpc *RpcLogic) Login(ctx context.Context, args *proto.LoginRequest, reply *proto.LoginResponse) (err error)
- func (rpc *RpcLogic) Logout(ctx context.Context, args *proto.LogoutRequest, reply *proto.LogoutResponse) (err error)
- func (rpc *RpcLogic) Push(ctx context.Context, args *proto.Send, reply *proto.SuccessReply) (err error)
- func (rpc *RpcLogic) PushRoom(ctx context.Context, args *proto.Send, reply *proto.SuccessReply) (err error)
- func (rpc *RpcLogic) Register(ctx context.Context, args *proto.RegisterRequest, reply *proto.RegisterReply) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var RedisClient *redis.Client
View Source
var RedisSessClient *redis.Client
Functions ¶
This section is empty.
Types ¶
type Logic ¶
type Logic struct {
ServerId string
}
func (*Logic) InitPublishRedisClient ¶
func (*Logic) InitRpcServer ¶
func (*Logic) RedisPublishChannel ¶
func (*Logic) RedisPublishRoomInfo ¶
func (*Logic) RedisPushRoomCount ¶
func (*Logic) RedisPushRoomInfo ¶
type RpcLogic ¶
type RpcLogic struct { }
func (*RpcLogic) CheckAuth ¶
func (rpc *RpcLogic) CheckAuth(ctx context.Context, args *proto.CheckAuthRequest, reply *proto.CheckAuthResponse) (err error)
func (*RpcLogic) Connect ¶
func (rpc *RpcLogic) Connect(ctx context.Context, args *proto.ConnectRequest, reply *proto.ConnectReply) (err error)
func (*RpcLogic) Count ¶
func (rpc *RpcLogic) Count(ctx context.Context, args *proto.Send, reply *proto.SuccessReply) (err error)
* get room online person count
func (*RpcLogic) DisConnect ¶
func (rpc *RpcLogic) DisConnect(ctx context.Context, args *proto.DisConnectRequest, reply *proto.DisConnectReply) (err error)
func (*RpcLogic) GetRoomInfo ¶
func (rpc *RpcLogic) GetRoomInfo(ctx context.Context, args *proto.Send, reply *proto.SuccessReply) (err error)
* get room info
func (*RpcLogic) GetUserInfoByUserId ¶
func (rpc *RpcLogic) GetUserInfoByUserId(ctx context.Context, args *proto.GetUserInfoRequest, reply *proto.GetUserInfoResponse) (err error)
func (*RpcLogic) Login ¶
func (rpc *RpcLogic) Login(ctx context.Context, args *proto.LoginRequest, reply *proto.LoginResponse) (err error)
func (*RpcLogic) Logout ¶
func (rpc *RpcLogic) Logout(ctx context.Context, args *proto.LogoutRequest, reply *proto.LogoutResponse) (err error)
func (*RpcLogic) Push ¶
func (rpc *RpcLogic) Push(ctx context.Context, args *proto.Send, reply *proto.SuccessReply) (err error)
* single send msg
func (*RpcLogic) PushRoom ¶
func (rpc *RpcLogic) PushRoom(ctx context.Context, args *proto.Send, reply *proto.SuccessReply) (err error)
* push msg to room
func (*RpcLogic) Register ¶
func (rpc *RpcLogic) Register(ctx context.Context, args *proto.RegisterRequest, reply *proto.RegisterReply) (err error)
Click to show internal directories.
Click to hide internal directories.