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. */
| 2382 | * This makes it possible to list all the sentinel instances connected |
| 2383 | * to a Redis server with CLIENT LIST, grepping for a specific name format. */ |
| 2384 | void sentinelSetClientName(sentinelRedisInstance *ri, redisAsyncContext *c, char *type) { |
| 2385 | char name[64]; |
| 2386 | |
| 2387 | snprintf(name,sizeof(name),"sentinel-%.8s-%s",sentinel.myid,type); |
| 2388 | if (redisAsyncCommand(c, sentinelDiscardReplyCallback, ri, |
| 2389 | "%s SETNAME %s", |
| 2390 | sentinelInstanceMapCommand(ri,"CLIENT"), |
| 2391 | name) == C_OK) |
| 2392 | { |
| 2393 | ri->link->pending_commands++; |
| 2394 | } |
| 2395 | } |
| 2396 | |
| 2397 | static int instanceLinkNegotiateTLS(redisAsyncContext *context) { |
| 2398 | #ifndef USE_OPENSSL |
no test coverage detected