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

Use redis.UniversalClient instead of *redis.Client #88

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

AH-dark
Copy link
Contributor

@AH-dark AH-dark commented Jan 14, 2024

This enables support for multiple types of redis clients.

UniversalClient is a wrapper client which, based on the provided options, represents either a ClusterClient, a FailoverClient, or a single-node Client. This can be useful for testing cluster-specific applications locally or having different clients in different environments.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (68982eb) 84.97% compared to head (42ba39e) 84.74%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #88      +/-   ##
===========================================
- Coverage    84.97%   84.74%   -0.24%     
===========================================
  Files           17       17              
  Lines         1278     1278              
===========================================
- Hits          1086     1083       -3     
- Misses         160      162       +2     
- Partials        32       33       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dxyinme dxyinme merged commit 0ff369b into libi:develop Jan 14, 2024
3 checks passed
@dxyinme dxyinme mentioned this pull request Feb 7, 2024
libi added a commit that referenced this pull request Mar 13, 2024
* chore: use `redis.UniversalClient` instead of `*redis.Client` (#88)

* make dcron running locally, update cron test, add GetJobs / GetJob function for dcron. (#89)

* 增加code coverage, 修复GetJob bug,增加devcontainer方便开发者 (#91)

* add example app to readme

* add NodeID function into dcron

* Deps: updated github.com/go-redis/redis/v8 to github.com/redis/go-redis/v9 (#73)

* add cron lib

* fix warning

* logger removal : phares1

* update

* update

* update

* add robfig/cron to dcron (#75)

* add NodeID function into dcron

* add cron lib

* fix warning

* logger removal : phares1

* update

* update

* update

* update

* update

* update

* update

* update test workflow

* revert 1.22

* update etcd driver

* update

* fix get nodes

* update

* update for fix TAT

* Revert "update etcd driver"

This reverts commit a21ebf7.

* Revert "deps: updated go-redis to v9 (#79)"

This reverts commit 0b85b24.

* update

* update

* refact etcd

* Revert "refact etcd"

This reverts commit 049bed1.

* Revert "update"

This reverts commit 9c71fd6.

* update

* refactor etcddriver

* fix error

* update

* Revert "update"

This reverts commit 6cfcfe6.

* Revert "fix error"

This reverts commit 99b2d82.

* Revert "refactor etcddriver"

This reverts commit a576ac3.

* update

* update

* remove comments, and fix

* add comments

* Add comments, add split the E2E test cases and other test cases. (#80)

* add example app to readme

* add NodeID function into dcron

* add cron lib

* fix warning

* logger removal : phares1

* update

* update

* update

* update

* update

* update

* update

* update test workflow

* revert 1.22

* update etcd driver

* update

* fix get nodes

* update

* update for fix TAT

* Revert "update etcd driver"

This reverts commit a21ebf7.

* Revert "deps: updated go-redis to v9 (#79)"

This reverts commit 0b85b24.

* update

* update

* refact etcd

* Revert "refact etcd"

This reverts commit 049bed1.

* Revert "update"

This reverts commit 9c71fd6.

* update

* refactor etcddriver

* fix error

* update

* Revert "update"

This reverts commit 6cfcfe6.

* Revert "fix error"

This reverts commit 99b2d82.

* Revert "refactor etcddriver"

This reverts commit a576ac3.

* update

* update

* remove comments, and fix

* add comments

* merge e2e test and normal test

* move e2etest to origin path

* add timeout to avoid pipeline timeout

* add getjobs related function

* update

* remove redis config in test workflow

* update

* update chain test in windows

* update action version for node 16 -> node 20

* add test for dcron locally

* update readme

* update

* fix code bug

* Update devcontainer and etcd driver test

---------

Co-authored-by: Ava Ackerman <withrjp@gmail.com>
Co-authored-by: libi <7769922+libi@users.noreply.github.com>

---------

Co-authored-by: AHdark <ahdark@outlook.com>
Co-authored-by: Ava Ackerman <withrjp@gmail.com>
Co-authored-by: libi <7769922+libi@users.noreply.github.com>
dxyinme added a commit that referenced this pull request Apr 24, 2024
* chore: use `redis.UniversalClient` instead of `*redis.Client` (#88)

* make dcron running locally, update cron test, add GetJobs / GetJob function for dcron. (#89)

* 增加code coverage, 修复GetJob bug,增加devcontainer方便开发者 (#91)

* add example app to readme

* add NodeID function into dcron

* Deps: updated github.com/go-redis/redis/v8 to github.com/redis/go-redis/v9 (#73)

* add cron lib

* fix warning

* logger removal : phares1

* update

* update

* update

* add robfig/cron to dcron (#75)

* add NodeID function into dcron

* add cron lib

* fix warning

* logger removal : phares1

* update

* update

* update

* update

* update

* update

* update

* update test workflow

* revert 1.22

* update etcd driver

* update

* fix get nodes

* update

* update for fix TAT

* Revert "update etcd driver"

This reverts commit a21ebf7.

* Revert "deps: updated go-redis to v9 (#79)"

This reverts commit 0b85b24.

* update

* update

* refact etcd

* Revert "refact etcd"

This reverts commit 049bed1.

* Revert "update"

This reverts commit 9c71fd6.

* update

* refactor etcddriver

* fix error

* update

* Revert "update"

This reverts commit 6cfcfe6.

* Revert "fix error"

This reverts commit 99b2d82.

* Revert "refactor etcddriver"

This reverts commit a576ac3.

* update

* update

* remove comments, and fix

* add comments

* Add comments, add split the E2E test cases and other test cases. (#80)

* add example app to readme

* add NodeID function into dcron

* add cron lib

* fix warning

* logger removal : phares1

* update

* update

* update

* update

* update

* update

* update

* update test workflow

* revert 1.22

* update etcd driver

* update

* fix get nodes

* update

* update for fix TAT

* Revert "update etcd driver"

This reverts commit a21ebf7.

* Revert "deps: updated go-redis to v9 (#79)"

This reverts commit 0b85b24.

* update

* update

* refact etcd

* Revert "refact etcd"

This reverts commit 049bed1.

* Revert "update"

This reverts commit 9c71fd6.

* update

* refactor etcddriver

* fix error

* update

* Revert "update"

This reverts commit 6cfcfe6.

* Revert "fix error"

This reverts commit 99b2d82.

* Revert "refactor etcddriver"

This reverts commit a576ac3.

* update

* update

* remove comments, and fix

* add comments

* merge e2e test and normal test

* move e2etest to origin path

* add timeout to avoid pipeline timeout

* add getjobs related function

* update

* remove redis config in test workflow

* update

* update chain test in windows

* update action version for node 16 -> node 20

* add test for dcron locally

* update readme

* update

* fix code bug

* Update devcontainer and etcd driver test

---------

Co-authored-by: Ava Ackerman <withrjp@gmail.com>
Co-authored-by: libi <7769922+libi@users.noreply.github.com>

* update test coverage

* make driver withOption -> WithOption

* update go.mod

* update go.mod

* update protobuf version

* etcd to 3.5.12

* fix etcd

* fix etcd

* Revert "fix etcd"

This reverts commit a21bf33.

* update miniredis

* update

* update go.mod

* update go mod

* update go mod

---------

Co-authored-by: AHdark <ahdark@outlook.com>
Co-authored-by: Ava Ackerman <withrjp@gmail.com>
Co-authored-by: libi <7769922+libi@users.noreply.github.com>
libi added a commit that referenced this pull request May 20, 2024
* opt: use runtime/debug.Stack() to print stack trace of panic (#93)

* 提升测试覆盖率,增加go1.22的test action. (#94)

* chore: use `redis.UniversalClient` instead of `*redis.Client` (#88)

* make dcron running locally, update cron test, add GetJobs / GetJob function for dcron. (#89)

* 增加code coverage, 修复GetJob bug,增加devcontainer方便开发者 (#91)

* add example app to readme

* add NodeID function into dcron

* Deps: updated github.com/go-redis/redis/v8 to github.com/redis/go-redis/v9 (#73)

* add cron lib

* fix warning

* logger removal : phares1

* add robfig/cron to dcron (#75)

* add NodeID function into dcron

* add cron lib

* fix warning

* logger removal : phares

* revert 1.22

* update etcd driver

* update

* fix get nodes

* update

* update for fix TAT

* Revert "update etcd driver"

This reverts commit a21ebf7.

* Revert "deps: updated go-redis to v9 (#79)"

This reverts commit 0b85b24.

* update

* update

* refact etcd

* Revert "refact etcd"

This reverts commit 049bed1.

* Revert "update"

This reverts commit 9c71fd6.

* update

* refactor etcddriver

* fix error

* update

* Revert "update"

This reverts commit 6cfcfe6.

* Revert "fix error"

This reverts commit 99b2d82.

* Revert "refactor etcddriver"

This reverts commit a576ac3.

* update

* update

* remove comments, and fix

* add comments

* Add comments, add split the E2E test cases and other test cases. (#80)

* add example app to readme

* add NodeID function into dcron

* add cron lib

* fix warning

* logger removal : phares1

* update test workflow

* revert 1.22

* update etcd driver

* update

* fix get nodes

* update

* update for fix TAT

* Revert "update etcd driver"

This reverts commit a21ebf7.

* Revert "deps: updated go-redis to v9 (#79)"

This reverts commit 0b85b24.

* update

* update

* refact etcd

* Revert "refact etcd"

This reverts commit 049bed1.

* Revert "update"

This reverts commit 9c71fd6.

* update

* refactor etcddriver

* fix error

* update

* Revert "update"

This reverts commit 6cfcfe6.

* Revert "fix error"

This reverts commit 99b2d82.

* Revert "refactor etcddriver"

This reverts commit a576ac3.

* update

* update

* remove comments, and fix

* add comments

* merge e2e test and normal test

* move e2etest to origin path

* add timeout to avoid pipeline timeout

* add getjobs related function

* update

* remove redis config in test workflow

* update

* update chain test in windows

* update action version for node 16 -> node 20

* add test for dcron locally

* update readme

* update

* fix code bug

* Update devcontainer and etcd driver test

---------

Co-authored-by: Ava Ackerman <withrjp@gmail.com>
Co-authored-by: libi <7769922+libi@users.noreply.github.com>

* update test coverage

* make driver withOption -> WithOption

* update go.mod

* update go.mod

* update protobuf version

* etcd to 3.5.12

* fix etcd

* fix etcd

* Revert "fix etcd"

This reverts commit a21bf33.

* update miniredis

* update

* update go.mod

* update go mod

* update go mod

---------

Co-authored-by: AHdark <ahdark@outlook.com>
Co-authored-by: Ava Ackerman <withrjp@gmail.com>
Co-authored-by: libi <7769922+libi@users.noreply.github.com>

* remove 1.22 test action to increase the test coverage. (#97)

---------

Co-authored-by: coti <54785329+coticom@users.noreply.github.com>
Co-authored-by: AHdark <ahdark@outlook.com>
Co-authored-by: Ava Ackerman <withrjp@gmail.com>
Co-authored-by: libi <7769922+libi@users.noreply.github.com>
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.

3 participants