Documentation
¶
Index ¶
- type RedisClient
- func (e *RedisClient) Exec(command string, args ...interface{}) (any, error)
- func (e *RedisClient) GetObject(key string, ptr any) error
- func (e *RedisClient) InitRedis(masterName string, address string, password string, dbIds int, maxIdle int, ...)
- func (e *RedisClient) Set(key string, val any) error
- func (e *RedisClient) SetEx(key string, val any, expires int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisClient ¶
type RedisClient struct {
Conn redis.Conn
Pool *redis.Pool
// contains filtered or unexported fields
}
func (*RedisClient) Exec ¶
func (e *RedisClient) Exec(command string, args ...interface{}) (any, error)
Exec 执行redis命令, 执行完成后连接自动放回连接池
func (*RedisClient) GetObject ¶
func (e *RedisClient) GetObject(key string, ptr any) error
func (*RedisClient) InitRedis ¶
func (*RedisClient) Set ¶
func (e *RedisClient) Set(key string, val any) error
Source Files
¶
- redis.go
Click to show internal directories.
Click to hide internal directories.