em-hiredis
em-hiredis copied to clipboard
pubsub command
The client uses the pubsub method to create and return the pubsub client. This masks the redis PUBSUB command.
There are two ways I can think of around this
- Change the name of the
pubsubmethod to something likepubsub_client - Pass
selftoPubsubClient.newin thepubsubmethod and keep a reference to it in thePubsubclientobject. Forward the call to thisClientobject in a method calledpubsubon thePubsubClientobject.
Good point; I don't think the command existed when I introduced this API. It's annoying, but I think the correct solution is to rename the pubsub method to pubsub_client as you suggest.
That would be a breaking change though, and would have to be announced and versioned accordingly