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(redis): add ScriptRun API and migrate EvalCtx to ScriptRun for limit, lock and bloom #3087

Merged
merged 4 commits into from
Apr 2, 2023

Conversation

zcong1993
Copy link
Member

https://redis.uptrace.dev/guide/lua-scripting.html#redis-script

The go-redis docs says:

Internally, go-redis uses EVALSHA to execute the script and fallbacks to EVAL if the script does not exist.

@zcong1993 zcong1993 requested a review from kevwan April 1, 2023 04:29
@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Merging #3087 (fe9737d) into master (b49fc81) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
core/bloom/bloom.go 95.58% <100.00%> (ø)
core/limit/periodlimit.go 89.36% <100.00%> (ø)
core/limit/tokenlimit.go 93.90% <100.00%> (ø)
core/stores/redis/redis.go 98.28% <100.00%> (+0.01%) ⬆️
core/stores/redis/redislock.go 81.39% <100.00%> (ø)

... and 1 file with indirect coverage changes

@zcong1993 zcong1993 changed the title feat(redis): add ScriptRun API and migrate EvalCtx to ScriptRun for limit and lock feat(redis): add ScriptRun API and migrate EvalCtx to ScriptRun for limit, lock and bloom Apr 2, 2023
@kevwan kevwan merged commit 5da8a93 into zeromicro:master Apr 2, 2023
@zcong1993 zcong1993 deleted the redis-script branch April 2, 2023 03:31
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

Successfully merging this pull request may close these issues.

None yet

2 participants