File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -746,6 +746,12 @@ var _ = Describe("ClusterClient", func() {
746746 })
747747 })
748748
749+ It ("should CLUSTER MYSHARDID" , func () {
750+ shardID , err := client .ClusterMyShardID (ctx ).Result ()
751+ Expect (err ).NotTo (HaveOccurred ())
752+ Expect (shardID ).ToNot (BeEmpty ())
753+ })
754+
749755 It ("should CLUSTER NODES" , func () {
750756 res , err := client .ClusterNodes (ctx ).Result ()
751757 Expect (err ).NotTo (HaveOccurred ())
Original file line number Diff line number Diff line change @@ -460,6 +460,7 @@ type Cmdable interface {
460460 PubSubShardChannels (ctx context.Context , pattern string ) * StringSliceCmd
461461 PubSubShardNumSub (ctx context.Context , channels ... string ) * MapStringIntCmd
462462
463+ ClusterMyShardID (ctx context.Context ) * StringCmd
463464 ClusterSlots (ctx context.Context ) * ClusterSlotsCmd
464465 ClusterShards (ctx context.Context ) * ClusterShardsCmd
465466 ClusterLinks (ctx context.Context ) * ClusterLinksCmd
@@ -3584,6 +3585,12 @@ func (c cmdable) PubSubNumPat(ctx context.Context) *IntCmd {
35843585
35853586//------------------------------------------------------------------------------
35863587
3588+ func (c cmdable ) ClusterMyShardID (ctx context.Context ) * StringCmd {
3589+ cmd := NewStringCmd (ctx , "cluster" , "myshardid" )
3590+ _ = c (ctx , cmd )
3591+ return cmd
3592+ }
3593+
35873594func (c cmdable ) ClusterSlots (ctx context.Context ) * ClusterSlotsCmd {
35883595 cmd := NewClusterSlotsCmd (ctx , "cluster" , "slots" )
35893596 _ = c (ctx , cmd )
You can’t perform that action at this time.
0 commit comments