Documentation
¶
Index ¶
- func Example_CMD(rdb *redis.Client)
- func Example_Hash(rdb *redis.Client)
- func Example_HyperLogLog(rdb *redis.Client)
- func Example_List(rdb *redis.Client)
- func Example_PubSub(rdb *redis.Client)
- func Example_Scan(rdb *redis.Client)
- func Example_Script(rdb *redis.Client)
- func Example_Set(rdb *redis.Client)
- func Example_SortedSet(rdb *redis.Client)
- func Example_String(rdb *redis.Client)
- func Example_Tx(rdb *redis.Client)
- func TestRedisBase(logs klog.Logger)
- type RedisService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Example_CMD ¶
func Example_CMD(rdb *redis.Client)
func Example_Hash ¶
func Example_Hash(rdb *redis.Client)
func Example_HyperLogLog ¶
func Example_HyperLogLog(rdb *redis.Client)
用来做基数统计的算法,HyperLogLog 的优点是,在输入元素的数量或者体积非常非常大时, 计算基数所需的空间总是*固定*的,并且是很小的。 每个 HyperLogLog 键只需要花费 12 KB 内存,就可以计算接近 2^64 个不同元素的基数 适合每月的每日签到情况
func Example_List ¶
func Example_List(rdb *redis.Client)
func Example_Scan ¶
func Example_Scan(rdb *redis.Client)
func Example_Script ¶
func Example_Script(rdb *redis.Client)
func Example_Set ¶
func Example_Set(rdb *redis.Client)
func Example_SortedSet ¶
func Example_SortedSet(rdb *redis.Client)
func Example_String ¶
func Example_String(rdb *redis.Client)
func Example_Tx ¶
func Example_Tx(rdb *redis.Client)
func TestRedisBase ¶
Types ¶
type RedisService ¶
func NewRedisService ¶
func NewRedisService(logs log.Logger) (*RedisService, error)
func (*RedisService) Close ¶
func (rs *RedisService) Close() error
func (*RedisService) GetPlayerUsername ¶
func (rs *RedisService) GetPlayerUsername(playerId int) (string, error)
func (*RedisService) SetPlayerUsername ¶
func (rs *RedisService) SetPlayerUsername(playerId int, username string) error
Click to show internal directories.
Click to hide internal directories.