Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add mode property to client #1618

Merged
merged 1 commit into from Jul 11, 2022
Merged

Conversation

joelrbrandt
Copy link
Contributor

@joelrbrandt joelrbrandt commented Jul 9, 2022

Adds a .mode getter to the client that reports whether the client is in 'normal', 'subscriber', or 'monitor' mode.

Use case

I'm implementing a connection pool using ioredis for the individual connections. When a resource is returned to the pool, I would like to be able to check whether it is in a mode suitable for distribution to another requester.

Adds a .mode getter to the client that reports whether the client is
in 'normal', 'subscriber', or 'monitor' mode.
@luin
Copy link
Collaborator

luin commented Jul 11, 2022

Hey @joelrbrandt 👋 ,

Thanks for the PR. Can you elaborate a bit more on the use case of this change?

@joelrbrandt
Copy link
Contributor Author

@luin

Can you elaborate a bit more on the use case of this change?

Sure! Added it to the PR description above. Thanks!

ioredis is awesome, by the way, thank you for your hard work.

@luin luin merged commit 9e6db7d into redis:main Jul 11, 2022
github-actions bot pushed a commit that referenced this pull request Jul 11, 2022
# [5.2.0](v5.1.0...v5.2.0) (2022-07-11)

### Features

* add mode property to client ([#1618](#1618)) ([9e6db7d](9e6db7d))
@github-actions
Copy link

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this pull request Mar 1, 2024
# [5.2.0](redis/ioredis@v5.1.0...v5.2.0) (2022-07-11)

### Features

* add mode property to client ([#1618](redis/ioredis#1618)) ([9e6db7d](redis/ioredis@9e6db7d))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants