mirror of
https://github.com/redis/go-redis.git
synced 2025-06-15 12:41:41 +03:00
✨ Add GETKEYSINSLOT api call for clustered redis
This commit is contained in:
@ -270,6 +270,7 @@ type Cmdable interface {
|
||||
ClusterResetHard() *StatusCmd
|
||||
ClusterInfo() *StringCmd
|
||||
ClusterKeySlot(key string) *IntCmd
|
||||
ClusterGetKeysInSlot(slot int, count int) *StringSliceCmd
|
||||
ClusterCountFailureReports(nodeID string) *IntCmd
|
||||
ClusterCountKeysInSlot(slot int) *IntCmd
|
||||
ClusterDelSlots(slots ...int) *StatusCmd
|
||||
@ -2402,6 +2403,12 @@ func (c *cmdable) ClusterKeySlot(key string) *IntCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *cmdable) ClusterGetKeysInSlot(slot int, count int) *StringSliceCmd {
|
||||
cmd := NewStringSliceCmd("cluster", "getkeysinslot", slot, count)
|
||||
c.process(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *cmdable) ClusterCountFailureReports(nodeID string) *IntCmd {
|
||||
cmd := NewIntCmd("cluster", "count-failure-reports", nodeID)
|
||||
c.process(cmd)
|
||||
|
Reference in New Issue
Block a user