-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(database/gredis): gredis support get raw client #4306
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
Conversation
可是咱们讨论了移除gredis😂 |
那是不是这个PR不会合并了?或者有没有其它方法使用暴露的pipeline方法 |
gredis 是基于go-redis封装的,你可以直接使用go-redis,你fork一下,然后创建一个自定义分支,加个获取redis配置的函数, 自己创建go-redis 实例来使用就行
|
我之前也准备提交这个,但是群里说gredis作为抽象层不应该暴露go-redis驱动的相关引用就放弃了,我现在是自定义了一个gredis,只保留了gins里对redis配置文件参数的解析和客户端的初始化还有多配置redis客户端获取,这样就能直接用go-redis驱动的方法,我看V3的计划表里也有删除gredis的意向,等等,我最近好像在某个isssues里也回复过老哥?? |
我觉得可以,还是需要提供Client暴露出来的 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Redis pipeline operations by exposing the underlying Redis client through a new Client()
method. This allows developers to access advanced Redis features like pipelining that aren't directly available through the standard Redis adapter interface.
- Added
Client()
method to theAdapterOperation
interface - Implemented
Client()
method in the Redis adapter to return the underlying client - Added comprehensive test coverage for the new functionality including pipeline operations
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
database/gredis/gredis_adapter.go | Added Client() method to AdapterOperation interface with documentation |
contrib/nosql/redis/redis_operation.go | Implemented Client() method to expose underlying redis client |
contrib/nosql/redis/redis_z_unit_test.go | Added comprehensive tests for Client() method and pipeline functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
我觉得可以,我自己是单独实现了一个获取底层client的package raw-gredis |
没错你应该回复的就是我 |
之前也是准备直接暴露Client但是也是社区说不要暴露底层所以就改成定义一个pipline方法 |
Fixes #4298
Fixes #2196
Fixes #2135