ROLE
YugaByte DB only has master
role for the Redis API.
SYNOPSIS
ROLE
This command provides information of a Redis instance, such as its role, its state of replication, its slaves, or its master. Roles are either “master”, “slave”, or “sentinel”.
- “master”
- An integer that represents state of replication
- An array of connected slaves { IP address, IP port, State of replication }
- “slave”
- Master IP address
- Master IP port
- Connection state that is either “disconnected”, “connecting”, “sync”, or “connected”
- An integer that represents state of replication
- “sentinel”
- An array of master names.
RETURN VALUE
Returns an array of values.
EXAMPLES
$ ROLE
1) "master"
2) 0
3) 1) 1) "127.0.0.1"
2) "9200"
3) "0"
2) 1) "127.0.0.1"
2) "9201"
3) "0"