Documentation
¶
Index ¶
- type Client
- func (c *Client) AddSet(key string, members ...interface{}) int64
- func (c *Client) AddZset(key string, value []*redis.Z) int64
- func (c *Client) Close()
- func (c *Client) Get(key string) string
- func (c *Client) GetList(key string) []string
- func (c *Client) GetListIndex(key string, index int64) string
- func (c *Client) GetListLength(key string) int64
- func (c *Client) GetSet(key string) []string
- func (c *Client) GetSetLength(key string) int64
- func (c *Client) GetZsetLength(key string) int64
- func (c *Client) GetZsetMember(key string, score string) float64
- func (c *Client) GetZsetRange(key string, start, stop int64) []string
- func (c *Client) GetZsetRangeByScore(key string, opt *redis.ZRangeBy) []string
- func (c *Client) GetZsetRevRange(key string, start, stop int64) []string
- func (c *Client) GetZsetScore(key string, member string) int64
- func (c *Client) Ping() string
- func (c *Client) PushList(key string, value interface{}) error
- func (c *Client) RemoveList(key string, value interface{}, count ...int64) error
- func (c *Client) RemoveListLeft(key string) error
- func (c *Client) RemoveListRight(key string) error
- func (c *Client) RemoveSet(key string, members ...interface{}) int64
- func (c *Client) RemoveZset(key string, members ...interface{}) int64
- func (c *Client) Set(key string, value interface{}, expiration ...int64) error
- func (c *Client) SetList(key string, index int64, value interface{}) error
- func (c *Client) SetNX(key string, value interface{}, expiration ...int64) bool
- func (c *Client) SetOptions(Options *redis.Options) *Client
- func (c *Client) TTL(key string) time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Options redis.Options
Clients *redis.Client
Ctx context.Context
ClusterClient *redis.ClusterClient
Mode bool
}
New parameter structure
func NewClusterClient ¶
NewClusterClient <Redis集群>
func NewFailoverClient ¶
NewFailoverClient <Redis哨兵>
func (*Client) GetListIndex ¶
GetListIndex value<返回名称为key的list中index位置的元素>
func (*Client) GetListLength ¶
GetList value<获取列表长度>
func (*Client) GetSetLength ¶
GetSetLength value<获取集合长度>
func (*Client) GetZsetLength ¶
GetSetLength value<获取集合长度>
func (*Client) GetZsetMember ¶
GetZsetScore value<获取集合>
func (*Client) GetZsetRange ¶
GetZsetRange value<获取有序集合>
func (*Client) GetZsetRangeByScore ¶
GetZsetRange value<返回有序集合指定区间内的成员分数从高到低>
func (*Client) GetZsetRevRange ¶
GetZsetRange value<返回有序集合指定区间内的成员分数从高到低>
func (*Client) GetZsetScore ¶
GetZsetScore value<获取集合>
func (*Client) RemoveList ¶
RemoveList value<删除列表> count 参数表示删除多少个key中的list
func (*Client) RemoveListLeft ¶
RemoveListLeft value<返回并删除名称为key的list中的首元素>
func (*Client) RemoveListRight ¶
RemoveListRight value<返回并删除名称为key的list中的尾元素>
func (*Client) RemoveZset ¶
RemoveZset value<获取集合>
func (*Client) SetOptions ¶
SetOptions <修改配置>
Click to show internal directories.
Click to hide internal directories.