Documentation ¶
Index ¶
- func GetRedisClient() *redis.Client
- func SetRedisClient(c *redis.Client)
- type Memory
- func (m *Memory) Decrease(key string) error
- func (m *Memory) Del(key ...string) error
- func (m *Memory) DelPattern(pattern string) error
- func (m *Memory) Expire(key string, dur time.Duration) error
- func (m *Memory) Get(key string) (string, error)
- func (m *Memory) GetClient() interface{}
- func (m *Memory) HashDel(hk string, key ...string) error
- func (m *Memory) HashDelPattern(hk, pattern string) error
- func (m *Memory) HashGet(hk, key string) (string, error)
- func (m *Memory) HashKeys(hk string) ([]string, error)
- func (m *Memory) HashSet(hk, key string, val interface{}, expire int) error
- func (m *Memory) Increase(key string) error
- func (m *Memory) Set(key string, val interface{}, expire int) error
- func (*Memory) String() string
- type Message
- func (m *Message) GetID() string
- func (m *Message) GetPrefix() (prefix string)
- func (m *Message) GetStream() string
- func (m *Message) GetValues() map[string]interface{}
- func (m *Message) SetID(id string)
- func (m *Message) SetPrefix(prefix string)
- func (m *Message) SetStream(stream string)
- func (m *Message) SetValues(values map[string]interface{})
- type Redis
- func (r *Redis) Decrease(key string) error
- func (r *Redis) Del(key ...string) error
- func (r *Redis) DelPattern(pattern string) error
- func (r *Redis) Expire(key string, dur time.Duration) error
- func (r *Redis) Get(key string) (string, error)
- func (r *Redis) GetClient() interface{}
- func (r *Redis) HashDel(hk string, key ...string) error
- func (r *Redis) HashDelPattern(hk, pattern string) error
- func (r *Redis) HashGet(hk, key string) (string, error)
- func (r *Redis) HashKeys(hk string) ([]string, error)
- func (r *Redis) HashSet(hk, key string, val interface{}, _ int) error
- func (r *Redis) Increase(key string) error
- func (r *Redis) Set(key string, val interface{}, expire int) error
- func (*Redis) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRedisClient ¶ added in v1.4.12
func GetRedisClient() *redis.Client
GetRedisClient 获取redis客户端
func SetRedisClient ¶ added in v1.4.12
func SetRedisClient(c *redis.Client)
SetRedisClient 设置redis客户端
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func (*Memory) DelPattern ¶ added in v1.3.26
func (*Memory) HashDelPattern ¶ added in v1.3.26
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis cache implement
func (*Redis) DelPattern ¶ added in v1.3.26
DelPattern delete key in redis
func (*Redis) HashDelPattern ¶ added in v1.3.26
HashDelPattern delete key in specify redis's hashtable
Click to show internal directories.
Click to hide internal directories.