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

Any thought given to dependency injection for Redis client? #3

Closed
iandouglas opened this issue Mar 8, 2017 · 4 comments
Closed

Any thought given to dependency injection for Redis client? #3

iandouglas opened this issue Mar 8, 2017 · 4 comments

Comments

@iandouglas
Copy link

We really like your library but our project is already using gopkg.in/redis.v5 and it feels odd to use a different Redis client library (which maintains its own connection to Redis) when we'd like to just use the client we've got elsewhere.

Any plans for dependency injection in this regard?

@iandouglas
Copy link
Author

I've modified your library a little to use gopkg.in/redis.v5 here, and I'd love any feedback you have. It doesn't do dependency injection for the Redis client as I suggested above.
https://github.com/iandouglas/rerate

@abo
Copy link
Owner

abo commented Mar 10, 2017

Thanks for suggestion, dependency injection looks like a good idea.

@iandouglas
Copy link
Author

Granted, dependency injection might be tricky unless the user's Redis client of choice implements all Redis commands properly that you utilize in this library. I'm happy to maintain my copy and I'll set a watch on your repo to see if new code gets merged in to apply bug fixes on my side as well.

@abo
Copy link
Owner

abo commented Mar 25, 2017

I just added the Buckets interface which is the backend of rerate, so we can using builtin RedigoBuckets/RedisV5Buckets or building a custom Buckets( MySQLBuckets, InMEMBuckets, etc.)

@abo abo closed this as completed Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants