Redis Role 命令

Redis 教程 · 2019-03-08 19:29:42

Redis Role 命令查看主从实例所属的角色,角色有master, slave, sentinel。

语法

redis Role 命令基本语法如下:

redis 127.0.0.1:6379> ROLE 

可用版本

>= 2.8.12

返回值

返回一个数组:第一个参数是 master, slave, sentinel 三个中的一个。

实例

redis 127.0.0.1:6379> ROLE 
1) "master"
2) (integer) 0
3) (empty list or set)
redis> 

点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html

查看所有标签

Mastering Regular Expressions, Second Edition

Mastering Regular Expressions, Second Edition

Jeffrey E F Friedl / O'Reilly Media / 2002-07-15 / USD 39.95

Regular expressions are an extremely powerful tool for manipulating text and data. They have spread like wildfire in recent years, now offered as standard features in Perl, Java, VB.NET and C# (and an......一起来看看 《Mastering Regular Expressions, Second Edition》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试