Our fake PUBLISH command: it is actually useful only to receive hello messages * from the other sentinel instances, and publishing to a channel other than * SENTINEL_HELLO_CHANNEL is forbidden. * * Because we have a Sentinel PUBLISH, the code to send hello messages is the same * for all the three kind of instances: masters, slaves, sentinels. */
| 4166 | * Because we have a Sentinel PUBLISH, the code to send hello messages is the same |
| 4167 | * for all the three kind of instances: masters, slaves, sentinels. */ |
| 4168 | void sentinelPublishCommand(client *c) { |
| 4169 | if (strcmp(szFromObj(c->argv[1]),SENTINEL_HELLO_CHANNEL)) { |
| 4170 | addReplyError(c, "Only HELLO messages are accepted by Sentinel instances."); |
| 4171 | return; |
| 4172 | } |
| 4173 | sentinelProcessHelloMessage(szFromObj(c->argv[2]),sdslen(szFromObj(c->argv[2]))); |
| 4174 | addReplyLongLong(c,1); |
| 4175 | } |
| 4176 | |
| 4177 | /* ===================== SENTINEL availability checks ======================= */ |
| 4178 |
nothing calls this directly
no test coverage detected