feat(redis):feat support redis pipeline
Please ensure you adhere to every item in this list.
- The PR title is formatted as follows:
<type>[optional scope]: <description>For example,fix(os/gtime): fix time zone issue<type>is mandatory and can be one offix,feat,build,ci,docs,style,refactor,perf,test,chorefix: Used when a bug has been fixed.feat: Used when a new feature has been added.build: Used for modifications to the project build system, such as changes to dependencies, external interfaces, or upgrading Node version.ci: Used for modifications to continuous integration processes, such as changes to Travis, Jenkins workflow configurations.docs: Used for modifications to documentation, such as changes to README files, API documentation, etc.style: Used for changes to code style, such as adjustments to indentation, spaces, blank lines, etc.refactor: Used for code refactoring, such as changes to code structure, variable names, function names, without altering functionality.perf: Used for performance optimization, such as improving code performance, reducing memory usage, etc.test: Used for modifications to test cases, such as adding, deleting, or modifying test cases for code.chore: Used for modifications to non-business-related code, such as changes to build processes or tool configurations.
- After
<type>, specify the affected package name or scope in parentheses, for example,(os/gtime). - The part after the colon uses the verb tense + phrase that completes the blank in
- Lowercase verb after the colon
- No trailing period
- Keep the title as short as possible. ideally under 76 characters or shorter
- Reference Documentation
- If there is a corresponding issue, add either
Fixes #1234orUpdates #1234(the latter if this is not a complete fix) to this comment - Delete these instructions once you have read and applied them
提交前请遵守每个事项,感谢!
- PR 标题格式如下:
<类型>[可选 范围]: <描述>例如fix(os/gtime): fix time zone issue<类型>是必须的,可以是fix、feat、build、ci、docs、style、refactor、perf、test、chore中的一个- fix: 用于修复了一个 bug
- feat: 用于新增了一个功能
- build: 用于修改项目构建系统,例如修改依赖库、外部接口或者升级 Node 版本等
- ci: 用于修改持续集成流程,例如修改 Travis、Jenkins 等工作流配置
- docs: 用于修改文档,例如修改 README 文件、API 文档等
- style: 用于修改代码的样式,例如调整缩进、空格、空行等
- refactor: 用于重构代码,例如修改代码结构、变量名、函数名等但不修改功能逻辑
- perf: 用于优化性能,例如提升代码的性能、减少内存占用等
- test: 用于修改测试用例,例如添加、删除、修改代码的测试用例等
- chore: 用于对非业务性代码进行修改,例如修改构建流程或者工具配置等
<类型>后在括号中填写受影响的包名或范围,例如(os/gtime)- 冒号后使用动词时态 + 短语
- 冒号后的动词小写
- 不要有结尾句号
- 标题尽量保持简短,最好在 76 个字符或更短
- 参考文档
- 如果有对应的 issue,请在此评论中添加
Fixes #1234,如果不是完全修复则添加Updates #1234 - 应用这些规则后删除所有的说明
可是咱们讨论了移除gredis😂
可是咱们讨论了移除gredis😂
那是不是这个PR不会合并了?或者有没有其它方法使用暴露的pipeline方法
gredis 是基于go-redis封装的,你可以直接使用go-redis,你fork一下,然后创建一个自定义分支,加个获取redis配置的函数, 自己创建go-redis 实例来使用就行
// database/gredis/gredis_redis.go
// GetConfig returns the deeply copied Config in the current client.
func (r *Redis) GetConfig() *Config {
return r.config
}
我之前也准备提交这个,但是群里说gredis作为抽象层不应该暴露go-redis驱动的相关引用就放弃了,我现在是自定义了一个gredis,只保留了gins里对redis配置文件参数的解析和客户端的初始化还有多配置redis客户端获取,这样就能直接用go-redis驱动的方法,我看V3的计划表里也有删除gredis的意向,等等,我最近好像在某个isssues里也回复过老哥??
https://github.com/gogf/gf/pull/4306/files#diff-27ba9cb3e60614ccdd6a2e5cdc82825ee6b1db0b8957c37fdbfa179cfd4ccd61R66 Fixes #4298 Fixes #2196 Fixes #2135
@LanceAdd @cyjaysong 看看这样折中解决行不行。https://github.com/gogf/gf/pull/4306/files#diff-27ba9cb3e60614ccdd6a2e5cdc82825ee6b1db0b8957c37fdbfa179cfd4ccd61R66
@LanceAdd @cyjaysong 看看这样折中解决行不行。https://github.com/gogf/gf/pull/4306/files#diff-27ba9cb3e60614ccdd6a2e5cdc82825ee6b1db0b8957c37fdbfa179cfd4ccd61R66
我觉得可以,还是需要提供Client暴露出来的
@LanceAdd @cyjaysong 看看这样折中解决行不行。https://github.com/gogf/gf/pull/4306/files#diff-27ba9cb3e60614ccdd6a2e5cdc82825ee6b1db0b8957c37fdbfa179cfd4ccd61R66
我觉得可以,我自己是单独实现了一个获取底层client的package raw-gredis
我之前也准备提交这个,但是群里说gredis作为抽象层不应该暴露go-redis驱动的相关引用就放弃了,我现在是自定义了一个gredis,只保留了gins里对redis配置文件参数的解析和客户端的初始化还有多配置redis客户端获取,这样就能直接用go-redis驱动的方法,我看V3的计划表里也有删除gredis的意向,等等,我最近好像在某个isssues里也回复过老哥??
没错你应该回复的就是我
Quote reply
之前也是准备直接暴露Client但是也是社区说不要暴露底层所以就改成定义一个pipline方法