diff options
author | dvora-h <67596500+dvora-h@users.noreply.github.com> | 2022-03-14 13:44:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 13:44:25 +0200 |
commit | a6a003c1b04635b5c40616faf451a09c5bc6372d (patch) | |
tree | 685e635e1d5060ac63ad2168d6831705fecd1e6a /redis/commands/cluster.py | |
parent | 5d5f8923e48f7fe2d30959db50cc9bcfc953578b (diff) | |
download | redis-py-a6a003c1b04635b5c40616faf451a09c5bc6372d.tar.gz |
Add support for CLUSTER LINKS (#2019)
* cluster links
* docstring
* skip test
Co-authored-by: Chayim <chayim@users.noreply.github.com>
Diffstat (limited to 'redis/commands/cluster.py')
-rw-r--r-- | redis/commands/cluster.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/redis/commands/cluster.py b/redis/commands/cluster.py index 4182726..d68f93b 100644 --- a/redis/commands/cluster.py +++ b/redis/commands/cluster.py @@ -427,6 +427,18 @@ class RedisClusterCommands( """ return self.execute_command("CLUSTER SLOTS", target_nodes=target_nodes) + def cluster_links(self, target_node): + """ + Each node in a Redis Cluster maintains a pair of long-lived TCP link with each + peer in the cluster: One for sending outbound messages towards the peer and one + for receiving inbound messages from the peer. + + This command outputs information of all such peer links as an array. + + For more information check https://redis.io/commands/cluster-links + """ + return self.execute_command("CLUSTER LINKS", target_nodes=target_node) + def readonly(self, target_nodes=None): """ Enables read queries. |