Skip to content

Commit e886a77

Browse files
author
ted.y
committed
ADD CLUSTER MYID Command
1 parent d9eeed1 commit e886a77

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cluster_commands.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package redis
33
import "context"
44

55
type ClusterCmdable interface {
6+
ClusterMyID(ctx context.Context) *StringCmd
67
ClusterMyShardID(ctx context.Context) *StringCmd
78
ClusterSlots(ctx context.Context) *ClusterSlotsCmd
89
ClusterShards(ctx context.Context) *ClusterShardsCmd
@@ -29,6 +30,12 @@ type ClusterCmdable interface {
2930
ReadWrite(ctx context.Context) *StatusCmd
3031
}
3132

33+
func (c cmdable) ClusterMyID(ctx context.Context) *StringCmd {
34+
cmd := NewStringCmd(ctx, "cluster", "myid")
35+
_ = c(ctx, cmd)
36+
return cmd
37+
}
38+
3239
func (c cmdable) ClusterMyShardID(ctx context.Context) *StringCmd {
3340
cmd := NewStringCmd(ctx, "cluster", "myshardid")
3441
_ = c(ctx, cmd)

0 commit comments

Comments
 (0)