Use CLIENT SETNAME to name the connection in the Redis instance as * sentinel- - * The connection type is "cmd" or "pubsub" as specified by 'type'. * * This makes it possible to list all the sentinel instances connected * to a Redis server with CLIENT LIST, grepping for a specific name format. */
| 2394 | * This makes it possible to list all the sentinel instances connected |
| 2395 | * to a Redis server with CLIENT LIST, grepping for a specific name format. */ |
| 2396 | void sentinelSetClientName(sentinelRedisInstance *ri, redisAsyncContext *c, const char *type) { |
| 2397 | char name[64]; |
| 2398 | |
| 2399 | snprintf(name,sizeof(name),"sentinel-%.8s-%s",sentinel.myid,type); |
| 2400 | if (redisAsyncCommand(c, sentinelDiscardReplyCallback, ri, |
| 2401 | "%s SETNAME %s", |
| 2402 | sentinelInstanceMapCommand(ri,"CLIENT"), |
| 2403 | name) == C_OK) |
| 2404 | { |
| 2405 | ri->link->pending_commands++; |
| 2406 | } |
| 2407 | } |
| 2408 | |
| 2409 | static int instanceLinkNegotiateTLS(redisAsyncContext *context) { |
| 2410 | #ifndef USE_OPENSSL |
no test coverage detected