logic

package
v0.0.0-...-5e1d9b1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 19 Imported by: 0

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

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 New

func New() *Logic

func (*Logic) InitPublishRedisClient

func (logic *Logic) InitPublishRedisClient() (err error)

func (*Logic) InitRpcServer

func (logic *Logic) InitRpcServer() (err error)

func (*Logic) RedisPublishChannel

func (logic *Logic) RedisPublishChannel(serverId string, toUserId int, msg []byte) (err error)

func (*Logic) RedisPublishRoomInfo

func (logic *Logic) RedisPublishRoomInfo(roomId int, count int, RoomUserInfo map[string]string, msg []byte) (err error)

func (*Logic) RedisPushRoomCount

func (logic *Logic) RedisPushRoomCount(roomId int, count int) (err error)

func (*Logic) RedisPushRoomInfo

func (logic *Logic) RedisPushRoomInfo(roomId int, count int, roomUserInfo map[string]string) (err error)

func (*Logic) Run

func (logic *Logic) Run()

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)

Directories

Path Synopsis
* * Created by lock * Date: 2019-09-22 * Time: 22:53
* * Created by lock * Date: 2019-09-22 * Time: 22:53

Jump to

Keyboard shortcuts

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