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
提交gredis命令接口 #1985
提交gredis命令接口 #1985
Conversation
type Commander interface{
KV() KV
System() System
// ...
}
type KV interface{
Get(ctx context.Context, key string) (value string, err error)
Set(ctx context.Context, key, value string) error
// ...
}
type System interface{
Flush(ctx context.Context) error
// ...
}
XRange(ctx context.Context, stream, start, stop string) ([]redis.XMessage, error)
XRangeN(ctx context.Context, stream, start, stop string, count int64) ([]redis.XMessage, error)
XRevRange(ctx context.Context, stream, start, stop string) ([]redis.XMessage, error)
XRevRangeN(ctx context.Context, stream, start, stop string, count int64) ([]redis.XMessage, error)
XReadStreams(ctx context.Context, streams ...string) ([]redis.XStream, error) 建议这部分方法要么做一下抽象,要么去掉让开发者通过 |
提个小建议,不建议提供Keys接口. O(n) |
Codecov ReportBase: 76.47% // Head: 76.47% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1985 +/- ##
=======================================
Coverage 76.47% 76.47%
=======================================
Files 517 517
Lines 46869 46869
=======================================
+ Hits 35844 35845 +1
Misses 9044 9044
+ Partials 1981 1980 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@gqcn 强哥,看下我重新提交的接口 |
Co-authored-by: John Guo <john@johng.cn>
No description provided.