Documentation
¶
Index ¶
- type ClusterRedis
- func (s *ClusterRedis) Connect() error
- func (s *ClusterRedis) Del(key string) error
- func (s *ClusterRedis) DisConnect() error
- func (s *ClusterRedis) Exists(key string) bool
- func (s *ClusterRedis) Expire(key string, dur time.Duration) error
- func (s *ClusterRedis) Get(key string) (string, error)
- func (s *ClusterRedis) HDel(key, field string) error
- func (s *ClusterRedis) HExists(key, field string) error
- func (s *ClusterRedis) HGet(key, field string) (string, error)
- func (s *ClusterRedis) HGetAll(key string) (map[string]string, error)
- func (s *ClusterRedis) HSet(key, field, value string) error
- func (s *ClusterRedis) Set(key, value string, expire time.Duration) error
- type Redis
- func (s *Redis) Del(key string) error
- func (s *Redis) Exists(key string) bool
- func (s *Redis) Expire(key string, dur time.Duration) error
- func (s *Redis) Get(key string) (string, error)
- func (s *Redis) HDel(key, field string) error
- func (s *Redis) HExists(key, field string) error
- func (s *Redis) HGet(key, field string) (string, error)
- func (s *Redis) HGetAll(key string) (map[string]string, error)
- func (s *Redis) HSet(key, field, value string) error
- func (s *Redis) Set(key, value string, expire time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterRedis ¶
type ClusterRedis struct {
// contains filtered or unexported fields
}
ClusterRedis 表示 Redis 集群缓存客户端。
func NewClusterRedis ¶
func NewClusterRedis(cfg *configv1.Data_Redis) (*ClusterRedis, func(), error)
NewClusterRedis 创建 Redis 集群缓存实例。
func (*ClusterRedis) Connect ¶
func (s *ClusterRedis) Connect() error
func (*ClusterRedis) Del ¶
func (s *ClusterRedis) Del(key string) error
func (*ClusterRedis) DisConnect ¶
func (s *ClusterRedis) DisConnect() error
func (*ClusterRedis) Exists ¶
func (s *ClusterRedis) Exists(key string) bool
func (*ClusterRedis) HDel ¶
func (s *ClusterRedis) HDel(key, field string) error
func (*ClusterRedis) HExists ¶
func (s *ClusterRedis) HExists(key, field string) error
func (*ClusterRedis) HGetAll ¶
func (s *ClusterRedis) HGetAll(key string) (map[string]string, error)
func (*ClusterRedis) HSet ¶
func (s *ClusterRedis) HSet(key, field, value string) error
Click to show internal directories.
Click to hide internal directories.