common

package
v0.0.0-...-84fc14a Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CmdPull     = 1
	CmdPost     = 2
	CmdFollow   = 3
	CmdUnFollow = 4
	CmdLike     = 5
	CmdOnline   = 6
	CmdOffline  = 7
)

把客户端请求在服务集群内部的命令字

View Source
const (
	UserLevelNormal = 0
	UserLevelSmall  = 1
	UserLevelMid    = 2
	UserLevelBig    = 3
	UserLevelSuper  = 4
)

用户V级定义

View Source
const ClientHeartBeatIntervalSec = 30

客户端心跳间隔

View Source
const ClientMaxIdleSec = 70

客户端心跳超时时长

View Source
const MaxMsgCountInPull = 15

一次pull请求最多拉取多少条msg

Variables

This section is empty.

Functions

func FollowedColNameOfVIP

func FollowedColNameOfVIP(userId int64) string

大V followed表名

Types

type DBFollow

type DBFollow struct {
	UserId     int64
	FollowId   int64
	FollowTime int64
}

follow表

type DBFollowed

type DBFollowed struct {
	UserId     int64
	FollowedId int64
	FollowTime int64
}

用户followed表

type DBLastMsgId

type DBLastMsgId struct {
	LastMsgId int64
}

lastMsgId表

type DBMsgContent

type DBMsgContent struct {
	MsgId     int64
	Text      string
	VideoUrl  string
	ImgUrlArr []string
}

msgContent表

type DBTransFollowed

type DBTransFollowed struct {
	UserId     int64
	FollowedId int64
	FollowTime int64
}

用户升级迁移临时followed表,记录迁移过程中发生的followed关系

type DBTransUnFollowed

type DBTransUnFollowed struct {
	UserId     int64
	FollowedId int64
}

用户升级转移临时TransUnFollowed表,记录迁移过程中发生的unfollowed关系

type DBUserLevel

type DBUserLevel struct {
	UserId        int64
	Level         int
	FollowerCount int

	//
	InTrans        bool
	TransBeginTime int64
}

用户V级表

type DBUserMsgId

type DBUserMsgId struct {
	UserId int64
	MsgId  int64
}

usrMsgId表

type ReqCmdT

type ReqCmdT struct {
	//req编号,本机唯一
	ReqId int64

	Cmd    int
	ReqMsg interface{} //req数据体指针,内容以及格式由命令收发方共同协商定义
}

内部命令定义

type ReqOffline

type ReqOffline struct {
	UserId int64
}

type ReqOnline

type ReqOnline struct {
	UserId           int64
	FrontNotifySvrId int32
}

type RspCmdT

type RspCmdT struct {
	//req编号,本机唯一
	ReqId int64

	RspMsg interface{} //rsp数据体的指针,内容以及格式由命令收发方共同协商定义
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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