File: //usr/lib/python3.9/site-packages/redis/commands/__pycache__/sentinel.cpython-39.pyc
a
��b � @ s* d dl Z G dd� d�ZG dd� de�ZdS )� Nc @ sx e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� ZdS )�SentinelCommandszn
A class containing the commands specific to redis sentinel. This class is
to be used as a mixin.
c G s t �td�� dS )�"Redis Sentinel's SENTINEL command.z%Use the individual sentinel_* methodsN)�warnings�warn�DeprecationWarning��self�args� r
�;/usr/lib/python3.9/site-packages/redis/commands/sentinel.py�sentinel
s zSentinelCommands.sentinelc C s | � d|�S )z:Returns a (host, port) pair for the given ``service_name``z SENTINEL GET-MASTER-ADDR-BY-NAME�Zexecute_command�r Zservice_namer
r
r � sentinel_get_master_addr_by_name s z1SentinelCommands.sentinel_get_master_addr_by_namec C s | � d|�S )z<Returns a dictionary containing the specified masters state.zSENTINEL MASTERr
r r
r
r �sentinel_master s z SentinelCommands.sentinel_masterc C s
| � d�S )z>Returns a list of dictionaries containing each master's state.zSENTINEL MASTERSr
�r r
r
r �sentinel_masters s z!SentinelCommands.sentinel_mastersc C s | � d||||�S )z,Add a new master to Sentinel to be monitoredzSENTINEL MONITORr
)r �nameZip�portZquorumr
r
r �sentinel_monitor s z!SentinelCommands.sentinel_monitorc C s | � d|�S )z*Remove a master from Sentinel's monitoringzSENTINEL REMOVEr
)r r r
r
r �sentinel_remove s z SentinelCommands.sentinel_removec C s | � d|�S )z0Returns a list of sentinels for ``service_name``zSENTINEL SENTINELSr
r r
r
r �sentinel_sentinels"