Documentation
¶
Overview ¶
*
- Created by lock
- Date: 2019-08-09
- Time: 15:24
Index ¶
- Constants
- func GetGinRunMode() string
- func GetMode() string
- func Init()
- type ApiBase
- type ApiConfig
- type Common
- type CommonEtcd
- type CommonRedis
- type Config
- type ConnectBase
- type ConnectBucket
- type ConnectConfig
- type ConnectRpcAddressTcp
- type ConnectRpcAddressWebsockts
- type ConnectTcp
- type ConnectWebsocket
- type LogicBase
- type LogicConfig
- type SiteBase
- type SiteConfig
- type TaskBase
- type TaskConfig
Constants ¶
View Source
const ( SuccessReplyCode = 0 FailReplyCode = 1 SuccessReplyMsg = "success" QueueName = "gochat_queue" RedisBaseValidTime = 86400 RedisPrefix = "gochat_" RedisRoomPrefix = "gochat_room_" RedisRoomOnlinePrefix = "gochat_room_online_count_" MsgVersion = 1 OpSingleSend = 2 // single user OpRoomSend = 3 // send to room OpRoomCountSend = 4 // get online user count OpRoomInfoSend = 5 // send info to room OpBuildTcpConn = 6 // build tcp conn )
Variables ¶
This section is empty.
Functions ¶
func GetGinRunMode ¶
func GetGinRunMode() string
Types ¶
type Common ¶
type Common struct { CommonEtcd CommonEtcd `mapstructure:"common-etcd"` CommonRedis CommonRedis `mapstructure:"common-redis"` }
type CommonEtcd ¶
type CommonRedis ¶
type Config ¶
type Config struct { Common Common Connect ConnectConfig Logic LogicConfig Task TaskConfig Api ApiConfig Site SiteConfig }
var Conf *Config
type ConnectBase ¶
type ConnectBucket ¶
type ConnectConfig ¶
type ConnectConfig struct { ConnectBase ConnectBase `mapstructure:"connect-base"` ConnectRpcAddressWebSockts ConnectRpcAddressWebsockts `mapstructure:"connect-rpcAddress-websockts"` ConnectRpcAddressTcp ConnectRpcAddressTcp `mapstructure:"connect-rpcAddress-tcp"` ConnectBucket ConnectBucket `mapstructure:"connect-bucket"` ConnectWebsocket ConnectWebsocket `mapstructure:"connect-websocket"` ConnectTcp ConnectTcp `mapstructure:"connect-tcp"` }
type ConnectRpcAddressTcp ¶
type ConnectRpcAddressTcp struct {
Address string `mapstructure:"address"`
}
type ConnectRpcAddressWebsockts ¶
type ConnectRpcAddressWebsockts struct {
Address string `mapstructure:"address"`
}
type ConnectTcp ¶
type ConnectTcp struct { ServerId string `mapstructure:"serverId"` Bind string `mapstructure:"bind"` SendBuf int `mapstructure:"sendbuf"` ReceiveBuf int `mapstructure:"receivebuf"` KeepAlive bool `mapstructure:"keepalive"` Reader int `mapstructure:"reader"` ReadBuf int `mapstructure:"readBuf"` ReadBufSize int `mapstructure:"readBufSize"` Writer int `mapstructure:"writer"` WriterBuf int `mapstructure:"writerBuf"` WriterBufSize int `mapstructure:"writeBufSize"` }
type ConnectWebsocket ¶
type LogicConfig ¶
type LogicConfig struct {
LogicBase LogicBase `mapstructure:"logic-base"`
}
type SiteConfig ¶
type SiteConfig struct {
SiteBase SiteBase `mapstructure:"site-base"`
}
type TaskConfig ¶
type TaskConfig struct {
TaskBase TaskBase `mapstructure:"task-base"`
}
Click to show internal directories.
Click to hide internal directories.