Sentinel
class Sentinel
Relay Sentinel client.
Constants
| OPT_THROW_ON_ERR | 
                     Whether to throw an exception on   | 
            
| OPT_AUTO_DISCOVER | 
                     Whether \Relay\Sentinel should automatically discover other sentinels in the
cluster, so it may use them if we fail to communicate with the first one.  | 
            
Methods
Establishes a new connection to a Sentinel instance.
Check if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover.
Force a failover as if the master was not reachable, and without asking for agreement to other Sentinels.
Force Sentinel to rewrite its configuration on disk, including the current Sentinel state.
Returns the ip and port number of the master with that name.
Returns the state and info of the specified master.
Returns a list of monitored masters and their state.
Returns the ID of the Sentinel instance.
Returns PONG if no message is provided, otherwise returns the message.
Will reset all the masters with matching name.
Returns a list of sentinel instances for this master, and their state.
Show a list of replicas for this master, and their state.
Returns the last error message, if any.
Sets a client option.
Returns a client option.
Details
        at line 3988
                            
    __construct(array|string|null $host = null, int $port = 26379, float $timeout = 0, mixed $persistent = null, int $retry_interval = 0, float $read_timeout = 0, mixed $auth = null, array|null $context = null)
        
    
    Establishes a new connection to a Sentinel instance.
For backwards compatibility with PhpRedis 6.x, the constructor may be called with a single options array.
        at line 4008
                            bool
    ckquorum(string $master)
        
    
    Check if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover.
        at line 4018
                            bool
    failover(string $master)
        
    
    Force a failover as if the master was not reachable, and without asking for agreement to other Sentinels.
        at line 4027
                            bool
    flushconfig()
        
    
    Force Sentinel to rewrite its configuration on disk, including the current Sentinel state.
        at line 4036
                            array|false
    getMasterAddrByName(string $master)
        
    
    Returns the ip and port number of the master with that name.
        at line 4045
                            array|false
    master(string $master)
        
    
    Returns the state and info of the specified master.
        at line 4053
                            array|false
    masters()
        
    
    Returns a list of monitored masters and their state.
        at line 4061
                            string
    myid()
        
    
    Returns the ID of the Sentinel instance.
        at line 4070
                            string|bool
    ping(string|null $message = null)
        
    
    Returns PONG if no message is provided, otherwise returns the message.
        at line 4079
                            int
    reset(string $pattern)
        
    
    Will reset all the masters with matching name.
        at line 4088
                            array|false
    sentinels(string $master)
        
    
    Returns a list of sentinel instances for this master, and their state.
        at line 4097
                            array|false
    slaves(string $master)
        
    
    Show a list of replicas for this master, and their state.
        at line 4105
                            string|null
    getLastError()
        
    
    Returns the last error message, if any.
        at line 4115
                            bool
    setOption(int $option, mixed $value)
        
    
    Sets a client option.
        at line 4124
                            mixed
    getOption(int $option)
        
    
    Returns a client option.