Documentation ¶
Index ¶
- func AddBlackList(playerid int64, ttl int64) error
- func AddPlayerSyncDB(playerid int64, sync *Syncdb) error
- func AddRequestNum(playerid int64, ttl int64, num int32) error
- func CheckRedisConnect() bool
- func ClearOnline()
- func Connect(host string, port int, database int) error
- func DelPlayerSyncDB(playerid int64) error
- func GetAllOnlinePlayer() map[int64]bool
- func GetAllPlayerIds() []int64
- func GetNeedSyncPlayer() []int64
- func GetOnline(playerid int64) bool
- func GetOnlineCount() int
- func GetOnlinePlayersWithCount(count int32) []int64
- func GetPlayersOnline(playerids []int64) (onlines map[int64]bool)
- func GetRedisPool() *redis.Pool
- func GetRequestNum(playerid int64) int32
- func IsInBlackList(playerid int64) bool
- func ReadConfig(key string) string
- func ReadNginxAddrs() ([]string, error)
- func RemoveNginxAddr(addr string) error
- func RemoveServerInfo(name string, id string) error
- func SetOffline(playerid int64)
- func SetOnline(playerid int64)
- func Startup(server string, database int) bool
- func Test()
- func WriteConfig(key string, config string) error
- func WriteNginxAddr(addr string) error
- func WriteNginxAddrs(addrs []string) error
- func WriteServerInfo(server *Server) error
- type HashCache
- type Server
- type Statistics
- type Syncdb
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPlayerSyncDB ¶
AddPlayerSyncDB 添加db同步信息
func AddRequestNum ¶
AddRequestNum 增加请求次数
func GetOnlinePlayersWithCount ¶
GetOnlinePlayersWithCount 获得指定数目的在线用户
func GetPlayersOnline ¶
GetPlayersOnline 批量获取用户在线状态
func ReadConfig ¶
func RemoveServerInfo ¶
RemoveServerInfo 删除服务器信息
func WriteConfig ¶
func WriteNginxAddrs ¶
Types ¶
type HashCache ¶
type HashCache struct {
// contains filtered or unexported fields
}
HashCache 哈希表缓存
type Server ¶
type Server struct { ID string `json:"ID"` //ID Version string `json:"Version"` //版本 Addr string `json:"Addr"` //地址 Name string `json:"Name"` //服务器名称 }
Server 服务器信息
Click to show internal directories.
Click to hide internal directories.