Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2021-02-21 00:10:29 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2021-02-21 00:10:29 +0300
commit5eb58a4c790b5e41869161af2ab60cb103d669c2 (patch)
tree7e118ea0d64d3fedcfa3d97f1ab006f9c99587bd /redis_sentinel.c
parent656dd5fe5b594920e346d2bf9e064fb53ee02d7c (diff)
[WIP] Issue #1894
Add RedisSentinel::myid command
Diffstat (limited to 'redis_sentinel.c')
-rw-r--r--redis_sentinel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/redis_sentinel.c b/redis_sentinel.c
index cbdf331c..6e125f52 100644
--- a/redis_sentinel.c
+++ b/redis_sentinel.c
@@ -40,6 +40,7 @@ zend_function_entry redis_sentinel_functions[] = {
PHP_ME(RedisSentinel, getMasterAddrByName, arginfo_value, ZEND_ACC_PUBLIC)
PHP_ME(RedisSentinel, master, arginfo_value, ZEND_ACC_PUBLIC)
PHP_ME(RedisSentinel, masters, arginfo_void, ZEND_ACC_PUBLIC)
+ PHP_ME(RedisSentinel, myid, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(RedisSentinel, ping, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(RedisSentinel, reset, arginfo_value, ZEND_ACC_PUBLIC)
PHP_ME(RedisSentinel, sentinels, arginfo_value, ZEND_ACC_PUBLIC)
@@ -132,6 +133,11 @@ PHP_METHOD(RedisSentinel, masters)
REDIS_PROCESS_KW_CMD("masters", redis_sentinel_cmd, sentinel_mbulk_reply_zipped_assoc);
}
+PHP_METHOD(RedisSentinel, myid)
+{
+ REDIS_PROCESS_KW_CMD("myid", redis_sentinel_cmd, redis_string_response);
+}
+
PHP_METHOD(RedisSentinel, ping)
{
REDIS_PROCESS_KW_CMD("PING", redis_empty_cmd, redis_boolean_response);