summaryrefslogtreecommitdiff
path: root/redis/commands/cluster.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/commands/cluster.py')
-rw-r--r--redis/commands/cluster.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/redis/commands/cluster.py b/redis/commands/cluster.py
index bcbfbd5..c3d7bd6 100644
--- a/redis/commands/cluster.py
+++ b/redis/commands/cluster.py
@@ -275,6 +275,17 @@ class RedisClusterCommands(
r.cluster_info(target_nodes=RedisCluster.ALL_NODES)
"""
+ def cluster_myid(self, target_node):
+ """
+ Returns the node’s id.
+
+ :target_node: 'ClusterNode'
+ The node to execute the command on
+
+ For more information check https://redis.io/commands/cluster-myid/
+ """
+ return self.execute_command("CLUSTER MYID", target_nodes=target_node)
+
def cluster_addslots(self, target_node, *slots):
"""
Assign new hash slots to receiving node. Sends to specified node.