Return the name of the type of the instance as a string. */
| 1442 | |
| 1443 | /* Return the name of the type of the instance as a string. */ |
| 1444 | const char *sentinelRedisInstanceTypeStr(sentinelRedisInstance *ri) { |
| 1445 | if (ri->flags & SRI_MASTER) return "master"; |
| 1446 | else if (ri->flags & SRI_SLAVE) return "slave"; |
| 1447 | else if (ri->flags & SRI_SENTINEL) return "sentinel"; |
| 1448 | else return "unknown"; |
| 1449 | } |
| 1450 | |
| 1451 | /* This function remove the Sentinel with the specified ID from the |
| 1452 | * specified master. |