Return information about the client with the specified ID (that was * previously obtained via the RedisModule_GetClientId() API). If the * client exists, REDISMODULE_OK is returned, otherwise REDISMODULE_ERR * is returned. * * When the client exist and the `ci` pointer is not NULL, but points to * a structure of type RedisModuleClientInfo, previously initialized with * the correct REDISMODU
| 2084 | * } |
| 2085 | */ |
| 2086 | int RM_GetClientInfoById(void *ci, uint64_t id) { |
| 2087 | client *client = lookupClientByID(id); |
| 2088 | if (client == NULL) return REDISMODULE_ERR; |
| 2089 | if (ci == NULL) return REDISMODULE_OK; |
| 2090 | |
| 2091 | /* Fill the info structure if passed. */ |
| 2092 | uint64_t structver = ((uint64_t*)ci)[0]; |
| 2093 | return modulePopulateClientInfoStructure(ci,client,structver); |
| 2094 | } |
| 2095 | |
| 2096 | /* Publish a message to subscribers (see PUBLISH command). */ |
| 2097 | int RM_PublishMessage(RedisModuleCtx *ctx, RedisModuleString *channel, RedisModuleString *message) { |
nothing calls this directly
no test coverage detected