/**
  * Asks sentinel to tell redis master server
  * 
  * @return array|false [host,port] array or false if case of error
  **/
 function getMaster()
 {
     if ($this->open()) {
         return Helper::executeCommand('sentinel', ['get-master-addr-by-name', $this->masterName], $this->_socket);
     } else {
         return false;
     }
 }
예제 #2
0
 public function executeCommand($name, $params = [])
 {
     $this->open();
     $result = Helper::executeCommand($name, $params, $this->_socket);
     return $result;
 }