1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

feat: Add support for CLUSTER SHARDS command (#2507)

* feat: Adding support for CLUSTER SHARDS command

Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
This commit is contained in:
Anurag Bandyopadhyay
2023-03-29 19:14:06 +05:30
committed by GitHub
parent 2cdd5ea34a
commit 9aba95a74f
3 changed files with 188 additions and 0 deletions

View File

@ -422,6 +422,7 @@ type Cmdable interface {
PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
ClusterSlots(ctx context.Context) *ClusterSlotsCmd
ClusterShards(ctx context.Context) *ClusterShardsCmd
ClusterLinks(ctx context.Context) *ClusterLinksCmd
ClusterNodes(ctx context.Context) *StringCmd
ClusterMeet(ctx context.Context, host, port string) *StatusCmd
@ -3506,6 +3507,12 @@ func (c cmdable) ClusterSlots(ctx context.Context) *ClusterSlotsCmd {
return cmd
}
func (c cmdable) ClusterShards(ctx context.Context) *ClusterShardsCmd {
cmd := NewClusterShardsCmd(ctx, "cluster", "shards")
_ = c(ctx, cmd)
return cmd
}
func (c cmdable) ClusterLinks(ctx context.Context) *ClusterLinksCmd {
cmd := NewClusterLinksCmd(ctx, "cluster", "links")
_ = c(ctx, cmd)