Compare commits

...

157 Commits

Author SHA1 Message Date
c8d21b4ef4 Replace RedisCluster to RedisUniversalClient (#114)
Some checks failed
build / test (push) Failing after 12s
build / lint (push) Failing after 15s
codeql / analyze (go) (push) Failing after 13m53s
1. Replace redis.Client to redis.UniversalClient
2. Replace ClusterConfig to UniversalConfig

closes #113

Co-authored-by: Aleksandr Tolstikhin <atolstikhin@mtsbank.ru>
Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
Reviewed-on: #114
Reviewed-by: Василий Толстов <v.tolstov@unistack.org>
Co-authored-by: Александр Толстихин <tolstihin1996@mail.ru>
Co-committed-by: Александр Толстихин <tolstihin1996@mail.ru>
2024-10-04 00:20:23 +03:00
195c604a31 Merge pull request 'add ability to get *redis.Client' (#111) from redis into master
Some checks failed
build / test (push) Failing after 1m28s
build / lint (push) Failing after 2m34s
codeql / analyze (go) (push) Failing after 2m44s
Reviewed-on: #111
2023-12-12 13:53:00 +03:00
b263b69031 add ability to get *redis.Client
Some checks failed
codeql / analyze (go) (pull_request) Failing after 2m41s
prbuild / test (pull_request) Failing after 1m29s
prbuild / lint (pull_request) Failing after 2m34s
autoapprove / autoapprove (pull_request) Failing after 1m26s
automerge / automerge (pull_request) Failing after 4s
dependabot-automerge / automerge (pull_request) Has been skipped
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-12-12 13:52:37 +03:00
4459bfa1a0 Merge pull request 'add mwrite func' (#109) from mwrite into master
Reviewed-on: #109
2023-10-21 00:58:08 +03:00
b90361e48a add MWrite func
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-10-21 00:57:12 +03:00
7ae302d438 add MSet func (#108)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
Reviewed-on: #108
2023-10-20 23:51:29 +03:00
655be440e7 Merge pull request 'add MDelete' (#107) from mdelete into v3
Reviewed-on: #107
2023-03-30 20:30:52 +03:00
8e516544f5 add MDelete
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-03-30 20:30:31 +03:00
97e30b0122 Merge pull request 'fix double init with empty context error' (#106) from init-fix into v3
Reviewed-on: #106
2023-03-17 12:41:11 +03:00
c9ce8498d2 fix double init with empty context error
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-03-17 12:40:50 +03:00
7e2590b43c
Merge pull request #105 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.14
Bump go.unistack.org/micro/v3 from 3.10.13 to 3.10.14
2023-02-27 20:04:25 +03:00
dependabot[bot]
e3db9c85dc
Bump go.unistack.org/micro/v3 from 3.10.13 to 3.10.14
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.13 to 3.10.14.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.13...v3.10.14)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 17:02:47 +00:00
de6c875f91
Merge pull request #104 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.13
Bump go.unistack.org/micro/v3 from 3.10.12 to 3.10.13
2023-02-22 19:14:48 +03:00
dependabot[bot]
3884de33f2
Bump go.unistack.org/micro/v3 from 3.10.12 to 3.10.13
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.12 to 3.10.13.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.12...v3.10.13)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-22 16:12:52 +00:00
9cbcfeb9c6
Merge pull request #103 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.12
Bump go.unistack.org/micro/v3 from 3.10.11 to 3.10.12
2023-02-21 20:26:16 +03:00
dependabot[bot]
011a9b2534
Bump go.unistack.org/micro/v3 from 3.10.11 to 3.10.12
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.11 to 3.10.12.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.11...v3.10.12)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 17:24:30 +00:00
f8dd344259
Merge pull request #102 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.11
Bump go.unistack.org/micro/v3 from 3.10.10 to 3.10.11
2023-02-14 20:00:27 +03:00
dependabot[bot]
bfd0536f06
Bump go.unistack.org/micro/v3 from 3.10.10 to 3.10.11
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.10 to 3.10.11.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.10...v3.10.11)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 16:58:09 +00:00
f95c953cad
Merge pull request #101 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.10
Bump go.unistack.org/micro/v3 from 3.10.9 to 3.10.10
2023-02-13 20:02:05 +03:00
dependabot[bot]
538f066be0
Bump go.unistack.org/micro/v3 from 3.10.9 to 3.10.10
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.9 to 3.10.10.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.9...v3.10.10)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 17:00:33 +00:00
69d321121b
Merge pull request #100 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.9
Bump go.unistack.org/micro/v3 from 3.10.8 to 3.10.9
2023-02-08 19:05:52 +03:00
dependabot[bot]
05831ca789
Bump go.unistack.org/micro/v3 from 3.10.8 to 3.10.9
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.8 to 3.10.9.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.8...v3.10.9)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 16:03:13 +00:00
70831b68df
Merge pull request #99 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.8
Bump go.unistack.org/micro/v3 from 3.10.6 to 3.10.8
2023-02-07 19:04:44 +03:00
dependabot[bot]
cccd131b77
Bump go.unistack.org/micro/v3 from 3.10.6 to 3.10.8
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.6 to 3.10.8.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.6...v3.10.8)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 16:02:49 +00:00
4ca9195091
Merge pull request #98 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.6
Bump go.unistack.org/micro/v3 from 3.10.5 to 3.10.6
2023-02-06 19:07:21 +03:00
dependabot[bot]
ae1d0d1c11
Bump go.unistack.org/micro/v3 from 3.10.5 to 3.10.6
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.5 to 3.10.6.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.5...v3.10.6)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 16:05:39 +00:00
fcab95bd8a
Merge pull request #97 from unistack-org/tuning
tune default redis opts, add tls config support
2023-02-01 01:50:52 +03:00
ede2cf695c tune default redis opts, add tls config support
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-02-01 01:48:47 +03:00
dependabot[bot]
755d601c94
Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 (#95)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.5 to 1.3.6.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.5...v1.3.6)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-30 21:21:49 +03:00
164969611a
Merge pull request #96 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.5
Bump go.unistack.org/micro/v3 from 3.10.4 to 3.10.5
2023-01-30 19:13:00 +03:00
dependabot[bot]
e0d526588b
Bump go.unistack.org/micro/v3 from 3.10.4 to 3.10.5
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.4 to 3.10.5.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.4...v3.10.5)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 16:10:45 +00:00
dependabot[bot]
990d87c946
Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#94)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.1...v3.4.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 09:55:03 +03:00
1e3f33dab8
Merge pull request #93 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.4
Bump go.unistack.org/micro/v3 from 3.10.1 to 3.10.4
2023-01-18 19:05:24 +03:00
dependabot[bot]
28ba5d2c25
Bump go.unistack.org/micro/v3 from 3.10.1 to 3.10.4
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.1 to 3.10.4.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.1...v3.10.4)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-18 16:03:32 +00:00
62973372d6
Merge pull request #92 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.1
Bump go.unistack.org/micro/v3 from 3.10.0 to 3.10.1
2023-01-17 19:05:39 +03:00
dependabot[bot]
7b820e6b02
Bump go.unistack.org/micro/v3 from 3.10.0 to 3.10.1
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.0...v3.10.1)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-17 16:03:55 +00:00
abab4e5428
Merge pull request #91 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.0
Bump go.unistack.org/micro/v3 from 3.9.18 to 3.10.0
2023-01-09 19:12:11 +03:00
dependabot[bot]
1d72797e95
Bump go.unistack.org/micro/v3 from 3.9.18 to 3.10.0
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.18 to 3.10.0.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.18...v3.10.0)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 16:10:24 +00:00
627e3fdb94
Merge pull request #90 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.18
Bump go.unistack.org/micro/v3 from 3.9.17 to 3.9.18
2022-12-28 19:05:26 +03:00
dependabot[bot]
1ad6cbfb2e
Bump go.unistack.org/micro/v3 from 3.9.17 to 3.9.18
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.17 to 3.9.18.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.17...v3.9.18)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-28 16:03:46 +00:00
5ff5b6e018
Merge pull request #89 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.17
Bump go.unistack.org/micro/v3 from 3.9.15 to 3.9.17
2022-12-26 19:05:49 +03:00
dependabot[bot]
0b9be86b6b
Bump go.unistack.org/micro/v3 from 3.9.15 to 3.9.17
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.15 to 3.9.17.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.15...v3.9.17)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 16:04:11 +00:00
a23f2dead7
Merge pull request #88 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.15
Bump go.unistack.org/micro/v3 from 3.9.13 to 3.9.15
2022-11-29 19:05:08 +03:00
dependabot[bot]
c76675c4d3
Bump go.unistack.org/micro/v3 from 3.9.13 to 3.9.15
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.13 to 3.9.15.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.13...v3.9.15)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 16:03:24 +00:00
dependabot[bot]
64e8a8a6bd
Bump hmarr/auto-approve-action from 2 to 3 (#87)
Bumps [hmarr/auto-approve-action](https://github.com/hmarr/auto-approve-action) from 2 to 3.
- [Release notes](https://github.com/hmarr/auto-approve-action/releases)
- [Commits](https://github.com/hmarr/auto-approve-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: hmarr/auto-approve-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 16:27:04 +03:00
3532091dc7
Merge pull request #86 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.13
Bump go.unistack.org/micro/v3 from 3.9.11 to 3.9.13
2022-11-14 19:06:27 +03:00
dependabot[bot]
2cda4e9af7
Bump go.unistack.org/micro/v3 from 3.9.11 to 3.9.13
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.11 to 3.9.13.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.11...v3.9.13)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 16:04:48 +00:00
dependabot[bot]
c182715e3e
Bump dependabot/fetch-metadata from 1.3.4 to 1.3.5 (#84)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.4 to 1.3.5.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.4...v1.3.5)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 07:27:15 +03:00
dependabot[bot]
4c3c2f880d
Bump golangci/golangci-lint-action from 3.3.0 to 3.3.1 (#85)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.0...v3.3.1)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-12 18:20:04 +03:00
3c726fb85e
Merge pull request #82 from unistack-org/dependabot/github_actions/golangci/golangci-lint-action-3.3.0
Bump golangci/golangci-lint-action from 3.2.0 to 3.3.0
2022-10-26 13:53:44 +03:00
95ac858c36
Merge branch 'v3' into dependabot/github_actions/golangci/golangci-lint-action-3.3.0 2022-10-26 13:52:08 +03:00
25b637a199
Merge pull request #83 from unistack-org/improve
add MGet/Mset options
2022-10-26 13:49:00 +03:00
edb352fd48 add MGet/Mset methods
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-10-26 13:47:11 +03:00
dependabot[bot]
1e78c57dc5
Bump golangci/golangci-lint-action from 3.2.0 to 3.3.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 16:20:56 +00:00
dependabot[bot]
fedc7ad843
Bump dependabot/fetch-metadata from 1.3.3 to 1.3.4 (#81)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.3...v1.3.4)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-06 17:35:30 +03:00
9d4daf95f6
Merge pull request #80 from unistack-org/timeout
limit timeout
2022-07-08 23:28:39 +03:00
cd2235c34f
Merge branch 'v3' into timeout 2022-07-08 23:26:38 +03:00
dependabot[bot]
5356120625
Bump dependabot/fetch-metadata from 1.3.1 to 1.3.3 (#79)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.1 to 1.3.3.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.1...v1.3.3)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-08 23:17:47 +03:00
da1b9deee3 limit timeout
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-07-08 23:17:14 +03:00
f737bf2006
Merge pull request #77 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.10
Bump go.unistack.org/micro/v3 from 3.9.8 to 3.9.10
2022-06-27 19:32:20 +03:00
dependabot[bot]
939d7e68e6
Bump go.unistack.org/micro/v3 from 3.9.8 to 3.9.10
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.8 to 3.9.10.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.8...v3.9.10)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 16:29:03 +00:00
dependabot[bot]
d59535d393
Bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 (#76)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-25 22:51:34 +03:00
bf975b41f5
Merge pull request #75 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.8
Bump go.unistack.org/micro/v3 from 3.9.7 to 3.9.8
2022-05-03 19:24:44 +03:00
dependabot[bot]
6756cc6dc7
Bump go.unistack.org/micro/v3 from 3.9.7 to 3.9.8
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.7 to 3.9.8.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.7...v3.9.8)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 16:22:50 +00:00
dependabot[bot]
d24f68dfb3
Bump github/codeql-action from 1 to 2 (#74)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 21:45:06 +03:00
dependabot[bot]
a539930570
Bump dependabot/fetch-metadata from 1.3.0 to 1.3.1 (#73)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-21 12:48:50 +03:00
11b8399aaa
Merge pull request #72 from unistack-org/dependabot/github_actions/actions/setup-go-3
Bump actions/setup-go from 2 to 3
2022-04-11 22:55:33 +03:00
dependabot[bot]
9b1cf8c16d
Bump actions/setup-go from 2 to 3
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 16:16:19 +00:00
b99fa3cdba
Merge pull request #71 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.7
Bump go.unistack.org/micro/v3 from 3.9.5 to 3.9.7
2022-03-30 19:21:43 +03:00
dependabot[bot]
dd79f332eb
Bump go.unistack.org/micro/v3 from 3.9.5 to 3.9.7
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.5 to 3.9.7.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.5...v3.9.7)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 16:19:29 +00:00
2b90494bb7
Merge pull request #70 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.5
Bump go.unistack.org/micro/v3 from 3.9.2 to 3.9.5
2022-03-28 19:20:42 +03:00
dependabot[bot]
4879c3cfe1
Bump go.unistack.org/micro/v3 from 3.9.2 to 3.9.5
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.2 to 3.9.5.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.2...v3.9.5)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 16:18:39 +00:00
d49d9099ab
Merge pull request #69 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.2
Bump go.unistack.org/micro/v3 from 3.9.1 to 3.9.2
2022-03-25 19:21:13 +03:00
dependabot[bot]
ef830f1b40
Bump go.unistack.org/micro/v3 from 3.9.1 to 3.9.2
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.1 to 3.9.2.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.1...v3.9.2)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 16:19:06 +00:00
5fb6e40b62
Merge pull request #66 from unistack-org/dependabot/github_actions/actions/cache-3
Bump actions/cache from 2 to 3
2022-03-22 23:11:54 +03:00
dependabot[bot]
0bf2804377
Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 09:50:51 -07:00
7fa664b87d
Merge pull request #68 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.1
Bump go.unistack.org/micro/v3 from 3.9.0 to 3.9.1
2022-03-22 19:50:04 +03:00
dependabot[bot]
793fb77411
Bump go.unistack.org/micro/v3 from 3.9.0 to 3.9.1
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.0...v3.9.1)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 17:40:55 +01:00
f7ae8c923a
Merge pull request #67 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.0
Bump go.unistack.org/micro/v3 from 3.8.21 to 3.9.0
2022-03-21 19:26:33 +03:00
dependabot[bot]
61f9eb9806
Bump go.unistack.org/micro/v3 from 3.8.21 to 3.9.0
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.21 to 3.9.0.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.21...v3.9.0)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 16:23:34 +00:00
fb727ebbef
Merge pull request #65 from unistack-org/dependabot/go_modules/github.com/go-redis/redis/v8-8.11.5
Bump github.com/go-redis/redis/v8 from 8.11.4 to 8.11.5
2022-03-18 16:29:41 +03:00
dependabot[bot]
56c894ad60
Bump github.com/go-redis/redis/v8 from 8.11.4 to 8.11.5
Bumps [github.com/go-redis/redis/v8](https://github.com/go-redis/redis) from 8.11.4 to 8.11.5.
- [Release notes](https://github.com/go-redis/redis/releases)
- [Changelog](https://github.com/go-redis/redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-redis/redis/compare/v8.11.4...v8.11.5)

---
updated-dependencies:
- dependency-name: github.com/go-redis/redis/v8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 16:30:27 +00:00
836096de98 update go version
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-03-07 13:46:44 +03:00
80f1207140 update workflows
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-03-05 19:10:09 +03:00
ba586a6502
Merge pull request #62 from unistack-org/dependabot/github_actions/golangci/golangci-lint-action-3.1.0
Bump golangci/golangci-lint-action from 2 to 3.1.0
2022-03-01 00:35:23 +03:00
dependabot[bot]
b653b2779f
Bump golangci/golangci-lint-action from 2 to 3.1.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2 to 3.1.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 16:26:23 +00:00
b463dc1718
Merge pull request #60 from unistack-org/dependabot/github_actions/dependabot/fetch-metadata-1.2.1
Bump dependabot/fetch-metadata from 1.1.1 to 1.2.1
2022-02-25 09:41:53 +03:00
dependabot[bot]
ab0ac77d07
Bump dependabot/fetch-metadata from 1.1.1 to 1.2.1
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.1.1 to 1.2.1.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.1.1...v1.2.1)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 16:15:06 +00:00
c891537ebf
Merge pull request #58 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.21
Bump go.unistack.org/micro/v3 from 3.8.20 to 3.8.21
2022-01-31 19:22:05 +03:00
dependabot[bot]
d1629ab145
Bump go.unistack.org/micro/v3 from 3.8.20 to 3.8.21
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.20 to 3.8.21.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.20...v3.8.21)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 16:21:20 +00:00
8beabbff96
Merge pull request #57 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.20
Bump go.unistack.org/micro/v3 from 3.8.19 to 3.8.20
2022-01-26 19:20:29 +03:00
dependabot[bot]
7301df6d94
Bump go.unistack.org/micro/v3 from 3.8.19 to 3.8.20
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.19 to 3.8.20.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.19...v3.8.20)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 16:19:47 +00:00
1e8dd60cf3
Merge pull request #56 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.19
Bump go.unistack.org/micro/v3 from 3.8.18 to 3.8.19
2022-01-25 19:21:45 +03:00
dependabot[bot]
c3facb7d7f
Bump go.unistack.org/micro/v3 from 3.8.18 to 3.8.19
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.18 to 3.8.19.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.18...v3.8.19)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 16:21:10 +00:00
f02a18ef8f
Merge pull request #55 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.18
Bump go.unistack.org/micro/v3 from 3.8.15 to 3.8.18
2022-01-21 19:23:02 +03:00
dependabot[bot]
e241daf8e5
Bump go.unistack.org/micro/v3 from 3.8.15 to 3.8.18
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.15 to 3.8.18.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.15...v3.8.18)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 16:22:24 +00:00
bab263a273
Merge pull request #54 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.15
Bump go.unistack.org/micro/v3 from 3.8.14 to 3.8.15
2022-01-20 19:28:18 +03:00
dependabot[bot]
9f4783b41b
Bump go.unistack.org/micro/v3 from 3.8.14 to 3.8.15
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.14 to 3.8.15.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.14...v3.8.15)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 16:27:16 +00:00
df4a459726
Merge pull request #53 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.14
Bump go.unistack.org/micro/v3 from 3.8.13 to 3.8.14
2022-01-10 19:38:08 +03:00
dependabot[bot]
5cbfea90d6
Bump go.unistack.org/micro/v3 from 3.8.13 to 3.8.14
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.13 to 3.8.14.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.13...v3.8.14)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 16:37:17 +00:00
68395b8008
Merge pull request #52 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.13
Bump go.unistack.org/micro/v3 from 3.8.11 to 3.8.13
2021-12-28 19:19:59 +03:00
dependabot[bot]
691d5ea7b3
Bump go.unistack.org/micro/v3 from 3.8.11 to 3.8.13
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.11 to 3.8.13.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.11...v3.8.13)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-28 16:19:13 +00:00
26d83959c2
Merge pull request #50 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.11
Bump go.unistack.org/micro/v3 from 3.8.7 to 3.8.11
2021-11-24 15:24:56 +03:00
5ea9bb0e7a
Merge branch 'master' into dependabot/go_modules/go.unistack.org/micro/v3-3.8.11 2021-11-24 15:24:22 +03:00
764e5dc1d7 fix for latest micro
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-11-24 15:23:47 +03:00
dependabot[bot]
973ba35807
Bump go.unistack.org/micro/v3 from 3.8.7 to 3.8.11
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.7 to 3.8.11.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.7...v3.8.11)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-24 11:52:38 +00:00
f38d49c30b update import paths
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-10-27 23:29:16 +03:00
github-actions[bot]
19bff8ae4b
Merge pull request #43 from unistack-org/dependabot/github_actions/actions/github-script-5
Bump actions/github-script from 4 to 5
2021-09-27 16:19:52 +00:00
dependabot[bot]
66c0a66322
Bump actions/github-script from 4 to 5
Bumps [actions/github-script](https://github.com/actions/github-script) from 4 to 5.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-27 16:18:56 +00:00
ee6d7b67a7 update workflow
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-21 21:48:03 +03:00
712d8d5867 update workflows
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-17 07:49:31 +03:00
8438b0f8eb enable automerge
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-16 11:10:14 +03:00
dependabot[bot]
d64573130d
Bump github.com/go-redis/redis/v8 from 8.8.2 to 8.11.3 (#40) 2021-09-06 15:03:05 +00:00
0392d48433 add github stuff
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-06 15:24:39 +03:00
c89919e100 add github stuff
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-06 15:11:45 +03:00
b592803f40 cleanup
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-05-20 22:50:28 +03:00
a3cb7dabae fix Exists method
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-05-20 22:49:30 +03:00
Renovate Bot
6b9fc567ca Update module github.com/unistack-org/micro/v3 to v3.3.17 2021-04-27 09:16:46 +00:00
Renovate Bot
45234ddfa5 Update module github.com/unistack-org/micro/v3 to v3.3.16 2021-04-20 14:04:02 +00:00
Renovate Bot
f3727aed5d Update module github.com/unistack-org/micro/v3 to v3.3.15 2021-04-19 14:55:06 +00:00
Renovate Bot
da43166147 Update module github.com/unistack-org/micro/v3 to v3.3.14 2021-04-19 05:08:26 +00:00
Renovate Bot
89a279ae9b Update module github.com/go-redis/redis/v8 to v8.8.2 2021-04-16 16:06:08 +00:00
Renovate Bot
c0536cccbf Update module github.com/unistack-org/micro/v3 to v3.3.13 2021-04-10 01:34:28 +00:00
Renovate Bot
2d27863bf9 Update module github.com/unistack-org/micro/v3 to v3.3.12 2021-04-09 22:29:26 +00:00
Renovate Bot
f1941f2cf1 Update module github.com/unistack-org/micro/v3 to v3.3.11 2021-04-03 10:30:35 +00:00
Renovate Bot
851ae2c0c4 Update module github.com/unistack-org/micro/v3 to v3.3.10 2021-03-31 22:44:42 +00:00
Renovate Bot
90c0419137 Update module github.com/unistack-org/micro/v3 to v3.3.9 2021-03-29 23:08:51 +00:00
Renovate Bot
95e0e958b6 Update module github.com/unistack-org/micro/v3 to v3.3.8 2021-03-29 01:24:43 +00:00
Renovate Bot
748bbaafdb Update module github.com/unistack-org/micro/v3 to v3.3.4 2021-03-26 17:41:40 +00:00
Renovate Bot
f52a8307b5 Update module github.com/unistack-org/micro/v3 to v3.3.2 2021-03-25 13:44:47 +00:00
Renovate Bot
c2259a6add Update module github.com/unistack-org/micro/v3 to v3.3.1 2021-03-24 23:56:31 +00:00
Renovate Bot
d0204f9652 Update module github.com/unistack-org/micro/v3 to v3.3.0 2021-03-24 12:33:02 +00:00
Renovate Bot
d0f60f9b02 Update module github.com/unistack-org/micro/v3 to v3.2.26 2021-03-23 17:22:44 +00:00
Renovate Bot
a715695207 Update module github.com/go-redis/redis/v8 to v8.8.0 2021-03-23 13:29:17 +00:00
Renovate Bot
847fb0dc9d Update module github.com/unistack-org/micro/v3 to v3.2.24 2021-03-21 15:51:27 +00:00
Renovate Bot
f89d21d668 Update module github.com/unistack-org/micro/v3 to v3.2.23 2021-03-16 18:17:51 +00:00
Renovate Bot
173deff52a Update module github.com/unistack-org/micro/v3 to v3.2.22 2021-03-15 00:58:16 +00:00
Renovate Bot
bc559f1f5e Update module github.com/unistack-org/micro/v3 to v3.2.20 2021-03-06 23:48:39 +00:00
Renovate Bot
d0bb55bbb2 Update module github.com/unistack-org/micro/v3 to v3.2.18 2021-03-06 19:14:47 +00:00
Renovate Bot
e4c6b0aefc Update module github.com/go-redis/redis/v8 to v8.7.1 2021-03-06 13:13:48 +00:00
Renovate Bot
c7e4002c6c Update module github.com/unistack-org/micro/v3 to v3.2.17 2021-03-05 18:41:43 +00:00
Renovate Bot
dfee609f94 Update module github.com/go-redis/redis/v8 to v8.7.0 2021-03-05 14:32:37 +00:00
Renovate Bot
fb3d737134 Update module github.com/unistack-org/micro/v3 to v3.2.16 2021-03-04 11:47:44 +00:00
1c535ada1f
Merge pull request #11 from unistack-org/renovate/all
Update module go-redis/redis/v8 to v8.6.0
2021-02-19 12:43:11 +03:00
Renovate Bot
baf9e88b06
Update module go-redis/redis/v8 to v8.6.0 2021-02-19 09:24:18 +00:00
Renovate Bot
c180d3620f Update module unistack-org/micro/v3 to v3.2.14 2021-02-18 18:05:26 +00:00
89e6433e6d update workflows
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-18 18:42:34 +03:00
Renovate Bot
4029294041 Update module unistack-org/micro/v3 to v3.2.11 2021-02-12 15:44:45 +00:00
Renovate Bot
a8c23525b5 Update module unistack-org/micro/v3 to v3.2.9 2021-02-12 12:48:40 +00:00
b79bcb4478 update renovate.json
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-12 12:36:53 +03:00
ab61b82f18
Merge pull request #7 from unistack-org/renovate/major-all
Update all deps to v2 (major)
2021-02-10 13:43:39 +03:00
cb1c619b34
Merge pull request #6 from unistack-org/renovate/all
Update all deps
2021-02-10 13:42:49 +03:00
Renovate Bot
f02a62b1ae
Update all deps to v2 2021-02-10 10:17:30 +00:00
Renovate Bot
dbcbf3de9f
Update all deps 2021-02-10 10:17:24 +00:00
cc54d499f9 move renovate.json
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-10 13:16:24 +03:00
7f340c9fb7
Merge pull request #1 from unistack-org/renovate/configure
Configure Renovate
2021-02-10 00:33:50 +03:00
Renovate Bot
5aaa623153
Add renovate.json 2021-02-08 23:36:53 +00:00
13 changed files with 673 additions and 373 deletions

19
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Maintain dependencies for Golang
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"

13
.github/stale.sh vendored
View File

@ -1,13 +0,0 @@
#!/bin/bash -ex
export PATH=$PATH:$(pwd)/bin
export GO111MODULE=on
export GOBIN=$(pwd)/bin
#go get github.com/rvflash/goup@v0.4.1
#goup -v ./...
#go get github.com/psampaz/go-mod-outdated@v0.6.0
go list -u -m -mod=mod -json all | go-mod-outdated -update -direct -ci || true
#go list -u -m -json all | go-mod-outdated -update

20
.github/workflows/autoapprove.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: "autoapprove"
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
permissions:
pull-requests: write
contents: write
jobs:
autoapprove:
runs-on: ubuntu-latest
steps:
- name: approve
uses: hmarr/auto-approve-action@v3
if: github.actor == 'vtolstov' || github.actor == 'dependabot[bot]'
id: approve
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

21
.github/workflows/automerge.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: "automerge"
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
permissions:
pull-requests: write
contents: write
jobs:
automerge:
runs-on: ubuntu-latest
if: github.actor == 'vtolstov'
steps:
- name: merge
id: merge
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.TOKEN}}

View File

@ -3,19 +3,20 @@ on:
push: push:
branches: branches:
- master - master
- v3
jobs: jobs:
test: test:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: setup - name: setup
uses: actions/setup-go@v1 uses: actions/setup-go@v3
with: with:
go-version: 1.15 go-version: 1.17
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: cache - name: cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -31,9 +32,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: lint - name: lint
uses: golangci/golangci-lint-action@v1 uses: golangci/golangci-lint-action@v3.4.0
continue-on-error: true continue-on-error: true
with: with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.

78
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,78 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "codeql"
on:
workflow_run:
workflows: ["prbuild"]
types:
- completed
push:
branches: [ master, v3 ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, v3 ]
schedule:
- cron: '34 1 * * 0'
jobs:
analyze:
name: analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup
uses: actions/setup-go@v3
with:
go-version: 1.17
# Initializes the CodeQL tools for scanning.
- name: init
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: analyze
uses: github/codeql-action/analyze@v2

View File

@ -0,0 +1,27 @@
name: "dependabot-automerge"
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
permissions:
pull-requests: write
contents: write
jobs:
automerge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.6
with:
github-token: "${{ secrets.TOKEN }}"
- name: merge
id: merge
if: ${{contains(steps.metadata.outputs.dependency-names, 'go.unistack.org')}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.TOKEN}}

View File

@ -3,19 +3,20 @@ on:
pull_request: pull_request:
branches: branches:
- master - master
- v3
jobs: jobs:
test: test:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: setup - name: setup
uses: actions/setup-go@v1 uses: actions/setup-go@v3
with: with:
go-version: 1.15 go-version: 1.17
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: cache - name: cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -31,9 +32,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: lint - name: lint
uses: golangci/golangci-lint-action@v1 uses: golangci/golangci-lint-action@v3.4.0
continue-on-error: true continue-on-error: true
with: with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.

14
go.mod
View File

@ -1,8 +1,14 @@
module github.com/unistack-org/micro-store-redis/v3 module go.unistack.org/micro-store-redis/v4
go 1.15 go 1.20
require ( require (
github.com/go-redis/redis/v8 v8.4.11 github.com/redis/go-redis/v9 v9.2.1
github.com/unistack-org/micro/v3 v3.2.4 go.unistack.org/micro/v4 v4.0.7
)
require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
) )

190
go.sum
View File

@ -1,182 +1,12 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/ef-ds/deque v1.0.4/go.mod h1:gXDnTC3yqvBcHbq2lcExjtAcVrOnJCbMcZXmuj8Z4tg= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/redis/go-redis/v9 v9.2.1 h1:WlYJg71ODF0dVspZZCpYmoF1+U1Jjk9Rwd7pq6QmlCg=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= go.unistack.org/micro/v4 v4.0.7 h1:2lwtZlHcSwgkahhFbkI4x1lOS79lw8uLHtcEhlFF+AM=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= go.unistack.org/micro/v4 v4.0.7/go.mod h1:bVEYTlPi0EsdgZZt311bIroDg9ict7ky3C87dSCCAGk=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/go-redis/redis/v8 v8.4.11 h1:t2lToev01VTrqYQcv+QFbxtGgcf64K+VUMgf9Ap6A/E=
github.com/go-redis/redis/v8 v8.4.11/go.mod h1:d5yY/TlkQyYBSBHnXUmnf1OrHbyQere5JV4dLKwvXmo=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I=
github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M=
github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U=
github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/unistack-org/micro/v3 v3.2.4 h1:V/QrzeSI/Bjd0j7uL8Lvvbbz8ky/0yj69srd1lE1RLI=
github.com/unistack-org/micro/v3 v3.2.4/go.mod h1:J8XxJj4Pqa3Ee0a4biRRtut7UwTlfBq8QRe+s4PKGS0=
go.opentelemetry.io/otel v0.16.0 h1:uIWEbdeb4vpKPGITLsRVUS44L5oDbDUCZxn8lkxhmgw=
go.opentelemetry.io/otel v0.16.0/go.mod h1:e4GKElweB8W2gWUqbghw0B8t5MCTccc9212eNHnOHwA=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

View File

@ -1,18 +1,12 @@
package redis package redis
import ( import (
"github.com/go-redis/redis/v8" "github.com/redis/go-redis/v9"
"github.com/unistack-org/micro/v3/store" "go.unistack.org/micro/v4/options"
) )
type configKey struct{} type universalConfigKey struct{}
func Config(c *redis.Options) store.Option { func UniversalConfig(c *redis.UniversalOptions) options.Option {
return store.SetOption(configKey{}, c) return options.ContextOption(universalConfigKey{}, c)
}
type clusterConfigKey struct{}
func ClusterConfig(c *redis.ClusterOptions) store.Option {
return store.SetOption(clusterConfigKey{}, c)
} }

452
redis.go Normal file → Executable file
View File

@ -3,31 +3,25 @@ package redis
import ( import (
"context" "context"
"fmt" "fmt"
"reflect"
"strings"
"time" "time"
"github.com/go-redis/redis/v8" "github.com/redis/go-redis/v9"
"github.com/unistack-org/micro/v3/store" "go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/store"
) )
type rkv struct { type Store struct {
opts store.Options opts store.Options
cli redisClient cli redis.UniversalClient
} }
type redisClient interface { func (r *Store) Connect(ctx context.Context) error {
Get(ctx context.Context, key string) *redis.StringCmd return r.cli.Ping(ctx).Err()
Del(ctx context.Context, keys ...string) *redis.IntCmd
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd
Keys(ctx context.Context, pattern string) *redis.StringSliceCmd
Exists(ctx context.Context, keys ...string) *redis.IntCmd
Close() error
} }
func (r *rkv) Connect(ctx context.Context) error { func (r *Store) Init(opts ...options.Option) error {
return nil
}
func (r *rkv) Init(opts ...store.Option) error {
for _, o := range opts { for _, o := range opts {
o(&r.opts) o(&r.opts)
} }
@ -35,31 +29,52 @@ func (r *rkv) Init(opts ...store.Option) error {
return r.configure() return r.configure()
} }
func (r *rkv) Disconnect(ctx context.Context) error { func (r *Store) Redis() redis.UniversalClient {
return r.cli
}
func (r *Store) Disconnect(ctx context.Context) error {
return r.cli.Close() return r.cli.Close()
} }
func (r *rkv) Exists(ctx context.Context, key string, opts ...store.ExistsOption) error { func (r *Store) Exists(ctx context.Context, key string, opts ...options.Option) error {
//options := store.NewReadOptions(opts...) if r.opts.Timeout > 0 {
//if len(options.Table) == 0 { var cancel context.CancelFunc
// options.Table = r.opts.Table ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
//} defer cancel()
rkey := fmt.Sprintf("%s%s", r.opts.Table, key) }
err := r.cli.Exists(ctx, rkey).Err() options := store.NewExistsOptions(opts...)
if len(options.Namespace) == 0 {
options.Namespace = r.opts.Namespace
}
if options.Namespace != "" {
key = fmt.Sprintf("%s%s", r.opts.Namespace, key)
}
val, err := r.cli.Exists(ctx, key).Result()
if err != nil { if err != nil {
return err
}
if val == 0 {
return store.ErrNotFound return store.ErrNotFound
} }
return nil return nil
} }
func (r *rkv) Read(ctx context.Context, key string, val interface{}, opts ...store.ReadOption) error { func (r *Store) Read(ctx context.Context, key string, val interface{}, opts ...options.Option) error {
if r.opts.Timeout > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
defer cancel()
}
options := store.NewReadOptions(opts...) options := store.NewReadOptions(opts...)
if len(options.Table) == 0 { if len(options.Namespace) == 0 {
options.Table = r.opts.Table options.Namespace = r.opts.Namespace
}
if options.Namespace != "" {
key = fmt.Sprintf("%s%s", options.Namespace, key)
} }
rkey := fmt.Sprintf("%s%s", options.Table, key) buf, err := r.cli.Get(ctx, key).Bytes()
buf, err := r.cli.Get(ctx, rkey).Bytes()
if err != nil && err == redis.Nil { if err != nil && err == redis.Nil {
return store.ErrNotFound return store.ErrNotFound
} else if err != nil { } else if err != nil {
@ -68,122 +83,301 @@ func (r *rkv) Read(ctx context.Context, key string, val interface{}, opts ...sto
if buf == nil { if buf == nil {
return store.ErrNotFound return store.ErrNotFound
} }
/*
d, err := r.Client.TTL(rkey).Result()
if err != nil {
return nil, err
}
records = append(records, &store.Record{
Key: key,
Value: val,
Expiry: d,
})
}
*/
return r.opts.Codec.Unmarshal(buf, val) return r.opts.Codec.Unmarshal(buf, val)
} }
func (r *rkv) Delete(ctx context.Context, key string, opts ...store.DeleteOption) error { func (r *Store) MRead(ctx context.Context, keys []string, vals interface{}, opts ...options.Option) error {
options := store.NewDeleteOptions(opts...) if len(keys) == 1 {
if len(options.Table) == 0 { vt := reflect.ValueOf(vals)
options.Table = r.opts.Table if vt.Kind() == reflect.Ptr {
vt = reflect.Indirect(vt)
return r.Read(ctx, keys[0], vt.Index(0).Interface(), opts...)
}
}
if r.opts.Timeout > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
defer cancel()
}
options := store.NewReadOptions(opts...)
rkeys := make([]string, 0, len(keys))
if len(options.Namespace) == 0 {
options.Namespace = r.opts.Namespace
}
for _, key := range keys {
if options.Namespace != "" {
rkeys = append(rkeys, fmt.Sprintf("%s%s", options.Namespace, key))
} else {
rkeys = append(rkeys, key)
}
} }
rkey := fmt.Sprintf("%s%s", options.Table, key) rvals, err := r.cli.MGet(ctx, rkeys...).Result()
return r.cli.Del(ctx, rkey).Err() if err != nil && err == redis.Nil {
return store.ErrNotFound
} else if err != nil {
return err
}
if len(rvals) == 0 {
return store.ErrNotFound
}
vv := reflect.ValueOf(vals)
vt := reflect.TypeOf(vals)
switch vv.Kind() {
case reflect.Ptr:
vv = reflect.Indirect(vv)
vt = vt.Elem()
}
if vv.Kind() != reflect.Slice {
return store.ErrNotFound
}
nvv := reflect.MakeSlice(vt, len(rvals), len(rvals))
vt = vt.Elem()
for idx := 0; idx < len(rvals); idx++ {
if rvals[idx] == nil {
continue
}
itm := nvv.Index(idx)
var buf []byte
switch b := rvals[idx].(type) {
case []byte:
buf = b
case string:
buf = []byte(b)
}
// special case for raw data
if vt.Kind() == reflect.Slice && vt.Elem().Kind() == reflect.Uint8 {
itm.Set(reflect.MakeSlice(itm.Type(), len(buf), len(buf)))
} else {
itm.Set(reflect.New(vt.Elem()))
}
if err = r.opts.Codec.Unmarshal(buf, itm.Interface()); err != nil {
return err
}
}
vv.Set(nvv)
return nil
} }
func (r *rkv) Write(ctx context.Context, key string, val interface{}, opts ...store.WriteOption) error { func (r *Store) MDelete(ctx context.Context, keys []string, opts ...options.Option) error {
if len(keys) == 1 {
return r.Delete(ctx, keys[0], opts...)
}
if r.opts.Timeout > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
defer cancel()
}
options := store.NewDeleteOptions(opts...)
if len(options.Namespace) == 0 {
options.Namespace = r.opts.Namespace
}
if options.Namespace == "" {
return r.cli.Del(ctx, keys...).Err()
}
for idx := range keys {
keys[idx] = options.Namespace + keys[idx]
}
return r.cli.Del(ctx, keys...).Err()
}
func (r *Store) Delete(ctx context.Context, key string, opts ...options.Option) error {
if r.opts.Timeout > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
defer cancel()
}
options := store.NewDeleteOptions(opts...)
if len(options.Namespace) == 0 {
options.Namespace = r.opts.Namespace
}
if options.Namespace == "" {
return r.cli.Del(ctx, key).Err()
}
return r.cli.Del(ctx, fmt.Sprintf("%s%s", options.Namespace, key)).Err()
}
func (r *Store) MWrite(ctx context.Context, keys []string, vals []interface{}, opts ...options.Option) error {
if len(keys) == 1 {
return r.Write(ctx, keys[0], vals[0], opts...)
}
if r.opts.Timeout > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
defer cancel()
}
options := store.NewWriteOptions(opts...) options := store.NewWriteOptions(opts...)
if len(options.Table) == 0 { kvs := make([]string, 0, len(keys)*2)
options.Table = r.opts.Table
if len(options.Namespace) == 0 {
options.Namespace = r.opts.Namespace
} }
rkey := fmt.Sprintf("%s%s", options.Table, key) for idx, key := range keys {
buf, err := r.opts.Codec.Marshal(val) if options.Namespace != "" {
kvs = append(kvs, fmt.Sprintf("%s%s", options.Namespace, key))
} else {
kvs = append(kvs, key)
}
switch vt := vals[idx].(type) {
case string:
kvs = append(kvs, vt)
case []byte:
kvs = append(kvs, string(vt))
default:
buf, err := r.opts.Codec.Marshal(vt)
if err != nil {
return err
}
kvs = append(kvs, string(buf))
}
}
cmds, err := r.cli.Pipelined(ctx, func(pipe redis.Pipeliner) error {
for idx := 0; idx < len(kvs); idx += 2 {
pipe.Set(ctx, kvs[idx], kvs[idx+1], options.TTL).Result()
}
return nil
})
if err != nil { if err != nil {
return err return err
} }
return r.cli.Set(ctx, rkey, buf, options.TTL).Err() for _, cmd := range cmds {
} if err = cmd.Err(); err != nil {
return err
func (r *rkv) List(ctx context.Context, opts ...store.ListOption) ([]string, error) {
options := store.NewListOptions(opts...)
if len(options.Table) == 0 {
options.Table = r.opts.Table
}
// TODO: add support for prefix/suffix/limit
keys, err := r.cli.Keys(ctx, "*").Result()
if err != nil {
return nil, err
}
return keys, nil
}
func (r *rkv) Options() store.Options {
return r.opts
}
func (r *rkv) Name() string {
return r.opts.Name
}
func (r *rkv) String() string {
return "redis"
}
func NewStore(opts ...store.Option) store.Store {
return &rkv{opts: store.NewOptions(opts...)}
}
func (r *rkv) configure() error {
var redisOptions *redis.Options
var redisClusterOptions *redis.ClusterOptions
var err error
nodes := r.opts.Nodes
if len(nodes) == 0 {
nodes = []string{"redis://127.0.0.1:6379"}
}
if r.opts.Context != nil {
if c, ok := r.opts.Context.Value(configKey{}).(*redis.Options); ok {
redisOptions = c
} }
if c, ok := r.opts.Context.Value(clusterConfigKey{}).(*redis.ClusterOptions); ok {
redisClusterOptions = c
}
}
if redisOptions != nil && redisClusterOptions != nil {
return fmt.Errorf("must specify only one option Config or ClusterConfig")
}
if redisOptions == nil && redisClusterOptions == nil && len(nodes) == 1 {
redisOptions, err = redis.ParseURL(nodes[0])
if err != nil {
//Backwards compatibility
redisOptions = &redis.Options{
Addr: nodes[0],
Password: "", // no password set
DB: 0, // use default DB
}
}
} else if redisOptions == nil && redisClusterOptions == nil && len(nodes) > 1 {
redisClusterOptions = &redis.ClusterOptions{Addrs: nodes}
}
if redisOptions != nil {
r.cli = redis.NewClient(redisOptions)
} else if redisClusterOptions != nil {
r.cli = redis.NewClusterClient(redisClusterOptions)
} }
return nil return nil
} }
func (r *Store) Write(ctx context.Context, key string, val interface{}, opts ...options.Option) error {
if r.opts.Timeout > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
defer cancel()
}
options := store.NewWriteOptions(opts...)
if len(options.Namespace) == 0 {
options.Namespace = r.opts.Namespace
}
var buf []byte
switch vt := val.(type) {
case string:
buf = []byte(vt)
case []byte:
buf = vt
default:
var err error
buf, err = r.opts.Codec.Marshal(val)
if err != nil {
return err
}
}
if options.Namespace != "" {
key = fmt.Sprintf("%s%s", options.Namespace, key)
}
return r.cli.Set(ctx, key, buf, options.TTL).Err()
}
func (r *Store) List(ctx context.Context, opts ...options.Option) ([]string, error) {
options := store.NewListOptions(opts...)
if len(options.Namespace) == 0 {
options.Namespace = r.opts.Namespace
}
rkey := fmt.Sprintf("%s%s*", options.Namespace, options.Prefix)
if options.Suffix != "" {
rkey += options.Suffix
}
if r.opts.Timeout > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
defer cancel()
}
// TODO: add support for prefix/suffix/limit
keys, err := r.cli.Keys(ctx, rkey).Result()
if err != nil {
return nil, err
}
if options.Namespace == "" {
return keys, nil
}
nkeys := make([]string, 0, len(keys))
for _, key := range keys {
nkeys = append(nkeys, strings.TrimPrefix(key, options.Namespace))
}
return nkeys, nil
}
func (r *Store) Options() store.Options {
return r.opts
}
func (r *Store) Name() string {
return r.opts.Name
}
func (r *Store) String() string {
return "redis"
}
func NewStore(opts ...options.Option) *Store {
return &Store{opts: store.NewOptions(opts...)}
}
func (r *Store) configure() error {
var redisUniversalOptions *redis.UniversalOptions
if r.cli != nil && r.opts.Context == nil {
return nil
}
if r.opts.Context != nil {
if c, ok := r.opts.Context.Value(universalConfigKey{}).(*redis.UniversalOptions); ok {
redisUniversalOptions = c
if r.opts.TLSConfig != nil {
redisUniversalOptions.TLSConfig = r.opts.TLSConfig
}
}
}
if redisUniversalOptions == nil && r.cli != nil {
return nil
}
if redisUniversalOptions == nil {
redisUniversalOptions = &redis.UniversalOptions{
Username: "",
Password: "", // no password set
DB: 0, // use default DB
MaxRetries: 2,
MaxRetryBackoff: 256 * time.Millisecond,
DialTimeout: 1 * time.Second,
ReadTimeout: 1 * time.Second,
WriteTimeout: 1 * time.Second,
PoolTimeout: 1 * time.Second,
MinIdleConns: 10,
TLSConfig: r.opts.TLSConfig,
}
}
if len(r.opts.Address) > 0 {
redisUniversalOptions.Addrs = r.opts.Address
} else if len(redisUniversalOptions.Addrs) == 0 {
redisUniversalOptions.Addrs = []string{"redis://127.0.0.1:6379"}
}
r.cli = redis.NewUniversalClient(redisUniversalOptions)
return nil
}

170
redis_test.go Normal file → Executable file
View File

@ -1,13 +1,15 @@
package redis package redis
import ( import (
"bytes"
"context" "context"
"os" "os"
"testing" "testing"
"time" "time"
"github.com/go-redis/redis/v8" "github.com/redis/go-redis/v9"
"github.com/unistack-org/micro/v3/store" "go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/store"
) )
func Test_rkv_configure(t *testing.T) { func Test_rkv_configure(t *testing.T) {
@ -27,44 +29,54 @@ func Test_rkv_configure(t *testing.T) {
wantErr bool wantErr bool
want wantValues want wantValues
}{ }{
{name: "No Url", fields: fields{options: store.Options{}, Client: nil}, {
name: "No Url", fields: fields{options: store.Options{}, Client: nil},
wantErr: false, want: wantValues{ wantErr: false, want: wantValues{
username: "", username: "",
password: "", password: "",
address: "127.0.0.1:6379", address: "127.0.0.1:6379",
}}, },
{name: "legacy Url", fields: fields{options: store.Options{Nodes: []string{"127.0.0.1:6379"}}, Client: nil}, },
{
name: "legacy Url", fields: fields{options: store.Options{Address: []string{"127.0.0.1:6379"}}, Client: nil},
wantErr: false, want: wantValues{ wantErr: false, want: wantValues{
username: "", username: "",
password: "", password: "",
address: "127.0.0.1:6379", address: "127.0.0.1:6379",
}}, },
{name: "New Url", fields: fields{options: store.Options{Nodes: []string{"redis://127.0.0.1:6379"}}, Client: nil}, },
{
name: "New Url", fields: fields{options: store.Options{Address: []string{"redis://127.0.0.1:6379"}}, Client: nil},
wantErr: false, want: wantValues{ wantErr: false, want: wantValues{
username: "", username: "",
password: "", password: "",
address: "127.0.0.1:6379", address: "127.0.0.1:6379",
}}, },
{name: "Url with Pwd", fields: fields{options: store.Options{Nodes: []string{"redis://:password@redis:6379"}}, Client: nil}, },
{
name: "Url with Pwd", fields: fields{options: store.Options{Address: []string{"redis://:password@redis:6379"}}, Client: nil},
wantErr: false, want: wantValues{ wantErr: false, want: wantValues{
username: "", username: "",
password: "password", password: "password",
address: "redis:6379", address: "redis:6379",
}}, },
{name: "Url with username and Pwd", fields: fields{options: store.Options{Nodes: []string{"redis://username:password@redis:6379"}}, Client: nil}, },
{
name: "Url with username and Pwd", fields: fields{options: store.Options{Address: []string{"redis://username:password@redis:6379"}}, Client: nil},
wantErr: false, want: wantValues{ wantErr: false, want: wantValues{
username: "username", username: "username",
password: "password", password: "password",
address: "redis:6379", address: "redis:6379",
}}, },
},
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
r := &rkv{ rc := &Store{
opts: tt.fields.options, opts: tt.fields.options,
cli: tt.fields.Client, cli: tt.fields.Client,
} }
err := r.configure() err := rc.configure()
if (err != nil) != tt.wantErr { if (err != nil) != tt.wantErr {
t.Errorf("configure() error = %v, wantErr %v", err, tt.wantErr) t.Errorf("configure() error = %v, wantErr %v", err, tt.wantErr)
return return
@ -79,33 +91,143 @@ func Test_Store(t *testing.T) {
if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 { if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 {
t.Skip() t.Skip()
} }
r := new(rkv) r := NewStore(options.Address(os.Getenv("STORE_NODES")))
//r.options = store.Options{Nodes: []string{"redis://:password@127.0.0.1:6379"}} if err := r.Init(); err != nil {
//r.options = store.Options{Nodes: []string{"127.0.0.1:6379"}} t.Fatal(err)
}
r.opts = store.NewOptions(store.Nodes(os.Getenv("STORE_NODES"))) if err := r.Connect(ctx); err != nil {
if err := r.configure(); err != nil {
t.Fatal(err) t.Fatal(err)
} }
key := "myTest" key := "myTest"
tval := []byte("myValue")
var val []byte var val []byte
err := r.Write(ctx, key, []byte("myValue"), store.WriteTTL(2*time.Minute)) err := r.Write(ctx, key, tval, store.WriteTTL(2*time.Minute))
if err != nil { if err != nil {
t.Fatalf("Write error: %v", err) t.Fatalf("Write error: %v", err)
} }
err = r.Read(ctx, key, val) err = r.Read(ctx, key, &val)
if err != nil { if err != nil {
t.Fatalf("Read error: %v\n", err) t.Fatalf("Read error: %v\n", err)
} else if !bytes.Equal(val, tval) {
t.Fatalf("read err: data not eq")
} }
keys, err := r.List(ctx)
if err != nil {
t.Fatalf("List error: %v\n", err)
}
_ = keys
err = r.Delete(ctx, key) err = r.Delete(ctx, key)
if err != nil { if err != nil {
t.Fatalf("Delete error: %v\n", err) t.Fatalf("Delete error: %v\n", err)
} }
_, err = r.List(ctx) // t.Logf("%v", keys)
}
func Test_MRead(t *testing.T) {
ctx := context.Background()
var err error
if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 {
t.Skip()
}
r := NewStore(options.Address(os.Getenv("STORE_NODES")))
if err = r.Init(); err != nil {
t.Fatal(err)
}
if err = r.Connect(ctx); err != nil {
t.Fatal(err)
}
key1 := "myTest1"
key2 := "myTest2"
tval1 := []byte("myValue1")
tval2 := []byte("myValue2")
var vals [][]byte
err = r.Write(ctx, key1, tval1, store.WriteTTL(2*time.Minute))
if err != nil {
t.Fatalf("Write error: %v", err)
}
err = r.Write(ctx, key2, tval2, store.WriteTTL(2*time.Minute))
if err != nil {
t.Fatalf("Write error: %v", err)
}
err = r.MRead(ctx, []string{key1, key2}, &vals)
if err != nil {
t.Fatalf("Read error: %v\n", err)
}
// t.Logf("%s", vals)
_ = vals
keys, err := r.List(ctx)
if err != nil { if err != nil {
t.Fatalf("List error: %v\n", err) t.Fatalf("List error: %v\n", err)
} }
_ = keys
// t.Logf("%v", keys)
err = r.Delete(ctx, key1)
if err != nil {
t.Fatalf("Delete error: %v\n", err)
}
err = r.Delete(ctx, key2)
if err != nil {
t.Fatalf("Delete error: %v\n", err)
}
} }
/*
func Test_MReadCodec(t *testing.T) {
type mytype struct {
Key string `json:"name"`
Val string `json:"val"`
}
ctx := context.Background()
var err error
if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 {
t.Skip()
}
r := NewStore(store.Nodes(os.Getenv("STORE_NODES")), store.Codec(jsoncodec.NewCodec()))
if err = r.Init(); err != nil {
t.Fatal(err)
}
if err = r.Connect(ctx); err != nil {
t.Fatal(err)
}
key1 := "myTest1"
key2 := "myTest2"
key3 := "myTest3"
tval1 := &mytype{Key: "key1", Val: "val1"}
tval2 := &mytype{Key: "key2", Val: "val2"}
var vals []*mytype
err = r.Write(ctx, key1, tval1, store.WriteTTL(2*time.Minute))
if err != nil {
t.Fatalf("Write error: %v", err)
}
err = r.Write(ctx, key2, tval2, store.WriteTTL(2*time.Minute))
if err != nil {
t.Fatalf("Write error: %v", err)
}
err = r.MRead(ctx, []string{key1, key3, key2}, &vals)
if err != nil {
t.Fatalf("Read error: %v\n", err)
}
if vals[0].Key != "key1" || vals[1] != nil || vals[2].Key != "key2" {
t.Fatalf("read err: struct not filled")
}
keys, err := r.List(ctx)
if err != nil {
t.Fatalf("List error: %v\n", err)
}
_ = keys
err = r.Delete(ctx, key1)
if err != nil {
t.Fatalf("Delete error: %v\n", err)
}
err = r.Delete(ctx, key2)
if err != nil {
t.Fatalf("Delete error: %v\n", err)
}
}
*/