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
| 2005 | * } |
| 2006 | */ |
| 2007 | int RM_GetClientInfoById(void *ci, uint64_t id) { |
| 2008 | client *client = lookupClientByID(id); |
| 2009 | if (client == NULL) return REDISMODULE_ERR; |
| 2010 | if (ci == NULL) return REDISMODULE_OK; |
| 2011 | |
| 2012 | /* Fill the info structure if passed. */ |
| 2013 | uint64_t structver = ((uint64_t*)ci)[0]; |
| 2014 | return modulePopulateClientInfoStructure(ci,client,structver); |
| 2015 | } |
| 2016 | |
| 2017 | /* Publish a message to subscribers (see PUBLISH command). */ |
| 2018 | int RM_PublishMessage(RedisModuleCtx *ctx, RedisModuleString *channel, RedisModuleString *message) { |
nothing calls this directly
no test coverage detected