Documentation
¶
Index ¶
- type RedisNode
- type RedisStorage
- func (this *RedisStorage) BindClientId(nodeAddr string, clientId string) error
- func (this *RedisStorage) ClientIdsOnline(clientIds []string) []string
- func (this *RedisStorage) ClientIdsOnlineWithLua(clientIds []string) []string
- func (this *RedisStorage) GetClientsIps(clientIds []string) (map[string][]string, error)
- func (this *RedisStorage) GetIps(clientId string) ([]string, error)
- func (this *RedisStorage) IsOnline(clientId string) bool
- func (this *RedisStorage) OnClientPing(nodeAddr string, clientId string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStorage ¶
type RedisStorage struct {
session_storage.SessionStorage
// contains filtered or unexported fields
}
func NewRedisStorage ¶
func NewRedisStorage(redisClient *eredis.RedisClient) *RedisStorage
NewRedisStorage return a RedisStorage
func (*RedisStorage) BindClientId ¶
func (this *RedisStorage) BindClientId(nodeAddr string, clientId string) error
BindClientId set online with clientId
func (*RedisStorage) ClientIdsOnline ¶
func (this *RedisStorage) ClientIdsOnline(clientIds []string) []string
ClientIdsOnline Get online users in the group
func (*RedisStorage) ClientIdsOnlineWithLua ¶
func (this *RedisStorage) ClientIdsOnlineWithLua(clientIds []string) []string
ClientIdsOnlineWithLua Get online users in the group
func (*RedisStorage) GetClientsIps ¶
func (this *RedisStorage) GetClientsIps(clientIds []string) (map[string][]string, error)
GetIps get ip list by clientId list
func (*RedisStorage) GetIps ¶
func (this *RedisStorage) GetIps(clientId string) ([]string, error)
GetIps get ip list by clientId
func (*RedisStorage) IsOnline ¶
func (this *RedisStorage) IsOnline(clientId string) bool
IsOnline determine if a clientId is online
func (*RedisStorage) OnClientPing ¶
func (this *RedisStorage) OnClientPing(nodeAddr string, clientId string) error
OnClientPing receive client heartbeat
Click to show internal directories.
Click to hide internal directories.