status_client

package
v0.0.0-...-e41513e Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

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

func Register

func Register(name string, adapter Instance)

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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