Versions in this module Expand all Collapse all v0 v0.1.1-alpha Oct 14, 2023 v0.0.6 Dec 11, 2023 Changes in this version + func Connect(host string, port int, database int) error v0.0.4 Oct 16, 2023 Changes in this version + 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 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 struct + func NewHashCache(name string) *HashCache + func (h *HashCache) Exists(keys ...interface{}) map[interface{}]bool + func (h *HashCache) Load(keys ...interface{}) (map[interface{}][]byte, error) + func (h *HashCache) Remove(ids []int64) error + func (h *HashCache) Save(data map[interface{}][]byte) error + type Server struct + Addr string + ID string + Name string + Version string + func ReadServerInfo(name string, id string) *Server + type Statistics struct + func NewStatistics() *Statistics + func (s *Statistics) ExpireResetData() + func (s *Statistics) Save() error + type Syncdb struct + Friend bool + Hero bool + Player bool + PlayerID int64 + Props bool + func GetPlayerSyncDB(playerid int64) *Syncdb