Documentation ¶
Index ¶
- type RedisConnectionFactory
- type RedisTemplete
- func (templete RedisTemplete) Delete(key string) error
- func (templete RedisTemplete) Get(key string) (string, error)
- func (templete RedisTemplete) ListLPop(key string) (string, error)
- func (templete RedisTemplete) ListLPush(key string, value string) error
- func (templete RedisTemplete) ListRPop(key string) (string, error)
- func (templete RedisTemplete) ListRPush(key string, value string) error
- func (it RedisTemplete) New(url string, password string) RedisTemplete
- func (templete RedisTemplete) Set(key string, value string, expireSeconds int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisConnectionFactory ¶
简单工厂
func (RedisConnectionFactory) Close ¶
func (factory RedisConnectionFactory) Close(conn redis.Conn)
关闭连接
func (RedisConnectionFactory) GetConnection ¶
func (factory RedisConnectionFactory) GetConnection() (redis.Conn, error)
新开一个连接
type RedisTemplete ¶
type RedisTemplete struct {
ConnectionFactory *RedisConnectionFactory
}
func (RedisTemplete) Delete ¶
func (templete RedisTemplete) Delete(key string) error
func (RedisTemplete) ListLPush ¶
func (templete RedisTemplete) ListLPush(key string, value string) error
func (RedisTemplete) ListRPush ¶
func (templete RedisTemplete) ListRPush(key string, value string) error
func (RedisTemplete) New ¶
func (it RedisTemplete) New(url string, password string) RedisTemplete
Click to show internal directories.
Click to hide internal directories.