Documentation ¶
Index ¶
- type Config
- type Store
- func (s *Store) Check(key string) (bool, error)
- func (s *Store) Close() error
- func (s *Store) Delete(key string) error
- func (s *Store) Get(key string) interface{}
- func (s *Store) IsExist(key string) bool
- func (s *Store) Set(key string, v interface{}, expiration time.Duration) error
- func (s *Store) ZAdd(key string, members ...redis.Z) (bool, error)
- func (s *Store) ZCount(key, min, max string) (int64, error)
- func (s *Store) ZIncrBy(key string, increment float64, member string) (bool, error)
- func (s *Store) ZRange(key string, start, stop int64) ([]string, error)
- func (s *Store) ZRangeByScore(key string, opt redis.ZRangeBy) ([]string, error)
- func (s *Store) ZRem(key string, members ...interface{}) (bool, error)
- func (s *Store) ZRemRangeByScore(key, min, max string) (bool, error)
- func (s *Store) ZRevRange(key string, start, stop int64) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string // 地址(IP:Port) DB int // 数据库 Password string // 密码 KeyPrefix string // 存储key的前缀 }
Config redis配置参数
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store redis存储
func NewStoreWithClient ¶
NewStoreWithClient 使用redis客户端创建存储实例
func NewStoreWithClusterClient ¶
func NewStoreWithClusterClient(cli *redis.ClusterClient, keyPrefix string) *Store
NewStoreWithClusterClient 使用redis集群客户端创建存储实例
func (*Store) ZRangeByScore ¶
func (*Store) ZRemRangeByScore ¶
Click to show internal directories.
Click to hide internal directories.