alicebob / miniredis

Pure Go Redis server for Go unittests
MIT License
3.11k stars 217 forks source link

Feature Request: `CLIENT` Command Not Supported #340

Closed bliutech closed 1 year ago

bliutech commented 1 year ago

I am interested in seeing support for the CLIENT command. Particularly for the use cases of CLIENT SETNAME and CLIENT GETNAME. I noticed that this was included in the list of commands that will probably not be supported. I am curious as to why this is the case because miniredis already seems to attempt to distinguish between peers and track at least the number of clients with INFO and this seems like something that would be a reasonable use case. Particularly, I am running into the issue with developing functional tests with go-redis as ClusterName is a reasonable field that could be set.

alicebob commented 1 year ago

On Fri, Aug 18, 2023 at 12:34:43PM -0700, Benson Liu wrote:

I am interested in seeing support for the CLIENT command. Particularly for the use cases of CLIENT SETNAME and CLIENT GETNAME. I noticed that this was included in the list of commands that will probably not be supported. I am curious as to why this is the case because miniredis already seems to attempt to distinguish between peers and track at least the number of clients with INFO and this seems like something that would be a reasonable use case. Particularly, I am running into the issue with developing functional tests with go-redis as ClusterName is a reasonable field that could be set.

The "not be supported" list is ancient, so take it with a grain of salt. The CLIENT GET/SETNAME command looks useful. I might have a look (it sounds easy), but if you want to try a PR that would probably be the quickest way.

bliutech commented 1 year ago

Awesome! Thanks. Will take a look.