diff options
author | dvora-h <67596500+dvora-h@users.noreply.github.com> | 2022-05-08 15:23:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 15:23:00 +0300 |
commit | faf55b65ffb7294b1a639cc9adb0231b987b0e32 (patch) | |
tree | 532e567a2d83598be3ef88bd14f76fb3d4f4da93 /redis/commands/cluster.py | |
parent | 3a8802214a05fed4a0828b1f2965ac140e11ee32 (diff) | |
download | redis-py-faf55b65ffb7294b1a639cc9adb0231b987b0e32.tar.gz |
Add support for CLUSTER SHARDS (#2151)
* Add support for CLUSTER SHARDS
* linters
* add docstring
* linters
Diffstat (limited to 'redis/commands/cluster.py')
-rw-r--r-- | redis/commands/cluster.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/redis/commands/cluster.py b/redis/commands/cluster.py index 06b702f..b91b65f 100644 --- a/redis/commands/cluster.py +++ b/redis/commands/cluster.py @@ -581,6 +581,14 @@ class ClusterManagementCommands(ManagementCommands): """ return self.execute_command("CLUSTER SLOTS", target_nodes=target_nodes) + def cluster_shards(self, target_nodes=None): + """ + Returns details about the shards of the cluster. + + For more information see https://redis.io/commands/cluster-shards + """ + return self.execute_command("CLUSTER SHARDS", target_nodes=target_nodes) + def cluster_links(self, target_node: "TargetNodesT") -> ResponseT: """ Each node in a Redis Cluster maintains a pair of long-lived TCP link with each |