Documentation ¶
Index ¶
Constants ¶
View Source
const ( ONLINE_TIMEOUT = 60 // 15秒 CHECK_ONLINE_TIMEOUT = 70 // 17秒, 15+2秒的误差 )
Variables ¶
This section is empty.
Functions ¶
func NewRedisStatusClient ¶
func NewRedisStatusClient(redis *redis_client.RedisPool) *redisStatusClient
func NewRpcStatusClient ¶
func NewRpcStatusClient(discovery *service_discovery.ServiceDiscoveryClientConfig) *rpcStatusClient
Types ¶
type Instance ¶
type Instance func() StatusClient
type StatusClient ¶
type StatusClient interface { Initialize(config string) error SetSessionOnline(userId int32, authKeyId int64, serverId, layer int32) error SetSessionOffline(userId int32, serverId int32, authKeyId int64) error GetUserOnlineSessions(userId int32) (*status.SessionEntryList, error) GetUsersOnlineSessionsList(userIdList []int32) (*status.UsersSessionEntryList, error) }
func NewStatusClient ¶
func NewStatusClient(adapterName, config string) (adapter StatusClient, err error)
Click to show internal directories.
Click to hide internal directories.