Compare commits

..

32 Commits

Author SHA1 Message Date
René
33e4479ce7 dynamic change detection based on the folders in the first level of the repository
dynamic generation of the release drafter config for the changed folders
2025-01-19 15:16:08 +01:00
René
adea65d290 dynamic change detection based on the folders in the first level of the repository
dynamic generation of the release drafter config for the changed folders
2025-01-19 14:53:02 +01:00
Juan Calderon-Perez
537b31756b Add timeout 2025-01-17 10:05:47 -05:00
Juan Calderon-Perez
3b91f93611 Rename variable 2025-01-17 10:04:55 -05:00
Juan Calderon-Perez
42831dcee6 Simplify even more 2025-01-17 10:01:22 -05:00
Juan Calderon-Perez
89a0a97fe8 Initial simplication of workflows 2025-01-17 08:50:38 -05:00
RW
86f1b406e3 Merge pull request #1552 from NuttyShrimp/fix/minio-close-object
fix(minio): close object after GetObject has returned
2025-01-16 14:16:50 +01:00
NuttyShrimp
102acc252b fix(minio): close object after GetObject has returned 2025-01-16 12:58:43 +01:00
RW
40a6167b74 Merge pull request #1543 from ksw2000/refactor-s3-config
♻️refactor(s3): WithEndpointResolver is deprecated
2025-01-10 09:05:59 +01:00
Kashiwa
e4d46ce66c fix: add missing file from previous commit 386b6f43 2025-01-09 13:05:33 +00:00
Kashiwa
386b6f431f refactor: WithEndpointResolverWithOptions is deprecated, use BaseEndpoint instead 2025-01-09 12:41:31 +00:00
RW
d2af2eb76b Merge pull request #1542 from tmiddlet2666/coherence-v2
Update coherence storage driver to v2 of coherence-go-client
2025-01-09 08:28:32 +01:00
Tim Middleton
395f8a80da Update coherence storage driver to v2 of coherence-go-client 2025-01-09 14:49:22 +08:00
Juan Calderon-Perez
76c52119bf 🧹 chore: Add Valkey 8.x to test workflow (#1539)
* Add Valkey 8.x to test workflow

* Update workflow
2025-01-07 17:48:16 +03:00
RW
87c2b454f8 Merge pull request #1538 from grivera64/add-valkey-driver
🔥 Feature: Add valkey driver
2025-01-07 13:38:07 +01:00
Juan Calderon-Perez
12ea6b4978 Fix spacing in README.md 2025-01-06 20:03:42 -05:00
Juan Calderon-Perez
cce70b9e7f Update test-valkey.yml 2025-01-06 19:57:56 -05:00
Juan Calderon-Perez
f8776d0233 Update test-valkey.yml 2025-01-06 12:01:49 -05:00
Juan Calderon-Perez
740eed9579 Update test-valkey.yml 2025-01-06 11:55:10 -05:00
Juan Calderon-Perez
baaf5c76e0 Update Valkey versions 2025-01-06 11:50:26 -05:00
Giovanni Rivera
9fa1710604 ♻ Refactor(valkey): Remove toolchain directive from go.mod 2025-01-05 22:05:44 -08:00
Giovanni Rivera
674175ded7 ♻ Refactor(valkey): Update README.md to say appropriate name and go version 2025-01-05 22:04:43 -08:00
Giovanni Rivera
fae399ccdc ♻ Refactor(valkey): Update workflow typo and missing versions 2025-01-05 21:56:17 -08:00
Giovanni Rivera
381f0c134e ♻: Refactor(valkey): Update workflow go version to 1.23 2025-01-03 23:30:27 -08:00
Giovanni Rivera
9013b623ea ♻: Refactor(valkey): Update go version to 1.23 2025-01-03 23:17:59 -08:00
Giovanni Rivera
512c66712a 🐛 Add missing generation of valkey certs 2025-01-03 23:15:40 -08:00
Giovanni Rivera
692f78abb0 🐛 (WIP) Update valkey test workflow to only use Go 1.21.x
This fixes an issue with the new `toolchain` directive in `go.mod`.
2025-01-03 20:45:38 -08:00
Giovanni Rivera
1a7044aded 📚 Doc(valkey): Update valkey README.md to swap redis/rueidis with valkey 2025-01-03 20:38:48 -08:00
Giovanni Rivera
88906bb82b 📚 Doc: Add valkey to README.md 2025-01-03 19:36:19 -08:00
Giovanni Rivera
5d095dc16b 🔥 (WIP) Add valkey workflows and release drafter 2025-01-03 19:29:33 -08:00
Giovanni Rivera
a18385a6ba 🐛 (WIP) Update go.mod and go.sum to work with valkey 2025-01-03 19:13:19 -08:00
Giovanni Rivera
1da3514e71 🔥 (WIP) Add valkey driver using rueidis driver as template 2025-01-03 19:05:31 -08:00
75 changed files with 1051 additions and 1962 deletions

View File

@@ -1,50 +0,0 @@
name-template: 'Azure Blob - v$RESOLVED_VERSION'
tag-template: 'azureblob/v$RESOLVED_VERSION'
tag-prefix: azureblob/v
include-paths:
- azureblob
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...azureblob/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Badger - v$RESOLVED_VERSION'
tag-template: 'badger/v$RESOLVED_VERSION'
tag-prefix: badger/v
include-paths:
- badger
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...badger/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Bbolt - v$RESOLVED_VERSION'
tag-template: 'bbolt/v$RESOLVED_VERSION'
tag-prefix: bbolt/v
include-paths:
- bbolt
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...bbolt/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'ClickHouse - v$RESOLVED_VERSION'
tag-template: 'clickhouse/v$RESOLVED_VERSION'
tag-prefix: clickhouse/v
include-paths:
- clickhouse
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...clickhouse/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,46 +0,0 @@
name-template: "CloudflareKV - v$RESOLVED_VERSION"
tag-template: "cloudflarekv/v$RESOLVED_VERSION"
tag-prefix: cloudflarekv/v
include-paths:
- cloudflarekv
categories:
- title: "🚀 New"
labels:
- "✏️ Feature"
- title: "🧹 Updates"
labels:
- "🧹 Updates"
- "🤖 Dependencies"
- title: "🐛 Fixes"
labels:
- "☢️ Bug"
- title: "📚 Documentation"
labels:
- "📒 Documentation"
change-template: "- $TITLE (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
- "✏️ Feature"
patch:
labels:
- "patch"
- "📒 Documentation"
- "☢️ Bug"
- "🤖 Dependencies"
- "🧹 Updates"
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...cloudflarekv/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Coherence - v$RESOLVED_VERSION'
tag-template: 'coherence/v$RESOLVED_VERSION'
tag-prefix: coherence/v
include-paths:
- coherence
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...coherence/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Couchbase - v$RESOLVED_VERSION'
tag-template: 'couchbase/v$RESOLVED_VERSION'
tag-prefix: couchbase/v
include-paths:
- couchbase
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...couchbase/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'DynamoDB - v$RESOLVED_VERSION'
tag-template: 'dynamodb/v$RESOLVED_VERSION'
tag-prefix: dynamodb/v
include-paths:
- dynamodb
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...dynamodb/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Etcd - v$RESOLVED_VERSION'
tag-template: 'etcd/v$RESOLVED_VERSION'
tag-prefix: etcd/v
include-paths:
- etcd
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...etcd/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Memcache - v$RESOLVED_VERSION'
tag-template: 'memcache/v$RESOLVED_VERSION'
tag-prefix: memcache/v
include-paths:
- memcache
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...memcache/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Memory - v$RESOLVED_VERSION'
tag-template: 'memory/v$RESOLVED_VERSION'
tag-prefix: memory/v
include-paths:
- memory
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...memory/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Minio - v$RESOLVED_VERSION'
tag-template: 'minio/v$RESOLVED_VERSION'
tag-prefix: minio/v
include-paths:
- minio
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...minio/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'MockStorage - v$RESOLVED_VERSION'
tag-template: 'mockstorage/v$RESOLVED_VERSION'
tag-prefix: mockstorage/v
include-paths:
- mockstorage
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...mockstorage/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'MongoDB - v$RESOLVED_VERSION'
tag-template: 'mongodb/v$RESOLVED_VERSION'
tag-prefix: mongodb/v
include-paths:
- mongodb
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...mongodb/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'MSSQL - v$RESOLVED_VERSION'
tag-template: 'mssql/v$RESOLVED_VERSION'
tag-prefix: mssql/v
include-paths:
- mssql
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...mssql/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'MySQL - v$RESOLVED_VERSION'
tag-template: 'mysql/v$RESOLVED_VERSION'
tag-prefix: mysql/v
include-paths:
- mysql
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...mysql/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Nats - v$RESOLVED_VERSION'
tag-template: 'nats/v$RESOLVED_VERSION'
tag-prefix: nats/v
include-paths:
- nats
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...nats/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: "Pebble - v$RESOLVED_VERSION"
tag-template: "pebble/v$RESOLVED_VERSION"
tag-prefix: pebble/v
include-paths:
- pebble
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...pebble/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Postgres - v$RESOLVED_VERSION'
tag-template: 'postgres/v$RESOLVED_VERSION'
tag-prefix: postgres/v
include-paths:
- postgres
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...postgres/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Redis - v$RESOLVED_VERSION'
tag-template: 'redis/v$RESOLVED_VERSION'
tag-prefix: redis/v
include-paths:
- redis
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...redis/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Ristretto - v$RESOLVED_VERSION'
tag-template: 'ristretto/v$RESOLVED_VERSION'
tag-prefix: ristretto/v
include-paths:
- ristretto
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...ristretto/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'Rueidis - v$RESOLVED_VERSION'
tag-template: 'rueidis/v$RESOLVED_VERSION'
tag-prefix: rueidis/v
include-paths:
- rueidis
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...rueidis/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'S3 - v$RESOLVED_VERSION'
tag-template: 's3/v$RESOLVED_VERSION'
tag-prefix: s3/v
include-paths:
- s3
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...s3/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'ScyllaDb - v$RESOLVED_VERSION'
tag-template: 'scylladb/v$RESOLVED_VERSION'
tag-prefix: scylladb/v
include-paths:
- scylladb
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...scylladb/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,50 +0,0 @@
name-template: 'SQLite3 - v$RESOLVED_VERSION'
tag-template: 'sqlite3/v$RESOLVED_VERSION'
tag-prefix: sqlite3/v
include-paths:
- sqlite3
categories:
- title: '❗ Breaking Changes'
labels:
- '❗ BreakingChange'
- title: '🚀 New'
labels:
- '✏️ Feature'
- title: '🧹 Updates'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
- title: '🐛 Fixes'
labels:
- '☢️ Bug'
- title: '📚 Documentation'
labels:
- '📒 Documentation'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- 'major'
- '❗ BreakingChange'
minor:
labels:
- 'minor'
- '✏️ Feature'
patch:
labels:
- 'patch'
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...sqlite3/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -1,8 +1,8 @@
name-template: 'ArangoDB - v$RESOLVED_VERSION'
tag-template: 'arangodb/v$RESOLVED_VERSION'
tag-prefix: arangodb/v
name-template: '{{FOLDER}} - v$RESOLVED_VERSION'
tag-template: '{{FOLDER}}/v$RESOLVED_VERSION'
tag-prefix: {{FOLDER}}/v
include-paths:
- arangodb
- {{FOLDER}}
categories:
- title: '❗ Breaking Changes'
labels:
@@ -45,6 +45,6 @@ version-resolver:
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...arangodb/v$RESOLVED_VERSION
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...{{FOLDER}}/v$RESOLVED_VERSION
Thank you $CONTRIBUTORS for making this update possible.

View File

@@ -56,7 +56,8 @@ _END_
generate_cert server "Server-only" "-extfile ./tls/openssl.cnf -extensions server_cert"
generate_cert client "Client-only" "-extfile ./tls/openssl.cnf -extensions client_cert"
generate_cert redis "localhost" "-extfile ./tls/openssl.cnf -extensions server_cert"
generate_cert valkey "localhost" "-extfile ./tls/openssl.cnf -extensions server_cert"
# List generated certs
ls -la ./tls
echo "$PWD"
echo "$PWD"

View File

@@ -1,54 +0,0 @@
name: "CodeQL"
on:
push:
branches: [master, main]
pull_request:
# The branches below must be a subset of the branches above
branches: [master, main]
schedule:
- cron: '0 3 * * 6'
jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
with:
languages: go
# 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@v3
# 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: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

View File

@@ -1,65 +0,0 @@
name: Gosec Security Scan
on:
push:
branches:
- "master"
- "main"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Changed Files
uses: tj-actions/changed-files@v45
id: changed-files
with:
files_ignore: |
.github/**
**.md
json: true
escape_json: false
dir_names: true
dir_names_max_depth: '1'
dir_names_exclude_current_dir: true
gosec-scan:
runs-on: ubuntu-latest
needs: detect-changes
env:
GO111MODULE: on
strategy:
matrix:
modules: ${{ fromJSON(needs.detect-changes.outputs.matrix) }}
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '^1.19.x'
check-latest: true
cache: false
- name: Install gosec
run: go install github.com/securego/gosec/v2/cmd/gosec@latest
- name: Run gosec
working-directory: ${{ matrix.modules }}
run: gosec ./...

View File

@@ -1,39 +0,0 @@
name: Govulncheck Security Scan
on:
push:
branches:
- "master"
- "main"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
jobs:
govulncheck-check:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
check-latest: true
cache: false
- name: Install Govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run Govulncheck
run: govulncheck ./...

View File

@@ -1,19 +0,0 @@
name: Release Drafter Arangodb
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'arangodb/**'
jobs:
draft_release_arangodb:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-arangodb.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Azureblob
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'azureblob/**'
jobs:
draft_release_azureblob:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-azureblob.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Badger
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'badger/**'
jobs:
draft_release_badger:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-badger.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Bbolt
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'bbolt/**'
jobs:
draft_release_bbolt:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-bbolt.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Clickhouse
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'clickhouse/**'
jobs:
draft_release_clickhouse:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-clickhouse.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Cloudflare KV
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- "cloudflarekv/**"
jobs:
draft_release_cloudflarekv:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-cloudflarekv.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Coherence
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'coherence/**'
jobs:
draft_release_coherence:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-coherence.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Couchbase
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'couchbase/**'
jobs:
draft_release_couchbase:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-couchbase.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Dynamodb
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'dynamodb/**'
jobs:
draft_release_dynamodb:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-dynamodb.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Etcd
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'etcd/**'
jobs:
draft_release_etcd:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-etcd.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Memcache
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'memcache/**'
jobs:
draft_release_memcache:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-memcache.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Memory
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'memory/**'
jobs:
draft_release_memcache:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-memory.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Minio
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'minio/**'
jobs:
draft_release_minio:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-minio.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter MockStorage
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'mockstorage/**'
jobs:
draft_release_memcache:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-mockstorage.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Mongodb
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'mongodb/**'
jobs:
draft_release_mongodb:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-mongodb.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Mssql
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'mssql/**'
jobs:
draft_release_mssql:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-mssql.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Mysql
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'mysql/**'
jobs:
draft_release_mysql:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-mysql.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Nats
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'nats/**'
jobs:
draft_release_nats:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-nats.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Pebble
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- "pebble/**"
jobs:
draft_release_pebble:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-pebble.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Postgres
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'postgres/**'
jobs:
draft_release_postgres:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-postgres.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Redis
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'redis/**'
jobs:
draft_release_redis:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-redis.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Ristretto
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'ristretto/**'
jobs:
draft_release_ristretto:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-ristretto.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter Rueidis
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'rueidis/**'
jobs:
draft_release_rueidis:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-rueidis.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter S3
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 's3/**'
jobs:
draft_release_s3:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-s3.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,19 +0,0 @@
name: Release Drafter ScyllaDb
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'scylladb/**'
jobs:
draft_release_scylladb:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-scylladb.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,20 +0,0 @@
name: Release Drafter Sqlite3
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
paths:
- 'sqlite3/**'
jobs:
draft_release_sqlite3:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-sqlite3.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

56
.github/workflows/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,56 @@
name: Release Drafter (All)
on:
push:
branches:
- master
- main
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate filters
id: filter-setup
run: |
filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . -exec basename {} \; | grep -v '^\.' | awk '{printf "%s=%s/**\n", $1, $1}')
echo "filters=$(echo \"$filters\")" >> $GITHUB_OUTPUT
shell: bash
- name: Filter changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: ${{ steps.filter-setup.outputs.filters }}
outputs:
packages: ${{ steps.filter.outputs.changes }}
release-drafter:
needs: changes
runs-on: ubuntu-latest
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate dynamic config from template
run: |
folder="${{ matrix.package }}"
sed "s|{{FOLDER}}|$folder|g" .github/release-drafter-template.yml > .github/release-drafter-$folder.yml
echo "Generated config for folder: $folder"
cat .github/release-drafter-$folder.yml
- name: Use dynamic release-drafter configuration
uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-${{ matrix.package }}.yml

View File

@@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
- name: Startup Coherence
run: |
docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:23.09.2
docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:24.09
sleep 30
- name: Install Go
uses: actions/setup-go@v5

63
.github/workflows/test-valkey.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
on:
push:
branches:
- master
- main
paths:
- 'valkey/**'
pull_request:
paths:
- 'valkey/**'
- '.github/workflows/test-valkey.yml'
name: "Tests Valkey"
jobs:
Tests:
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- 1.23.x
valkey:
- '7.x'
- '8.x'
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- name: Generate TLS certs
run: ./.github/scripts/gen-test-certs.sh
- name: Setup Valkey
uses: shogo82148/actions-setup-redis@v1
with:
distribution: 'valkey'
redis-version: ${{ matrix.valkey }}
auto-start: 'false'
redis-port: '6379'
redis-tls-port: '6380'
- name: Run Valkey
run: |
valkey-server --tls-port 6380 --port 6379 \
--tls-cert-file /home/runner/work/storage/storage/tls/valkey.crt \
--tls-key-file /home/runner/work/storage/storage/tls/valkey.key \
--tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt &
- name: Setup Valkey Cluster
uses: vishnudxb/redis-cluster@1.0.9
with:
master1-port: 7000
master2-port: 7001
master3-port: 7002
slave1-port: 7003
slave2-port: 7004
slave3-port: 7005
sleep-duration: 10
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go-version }}'
- name: Run Test
run: cd ./valkey && go test ./... -v -race

View File

@@ -75,3 +75,4 @@ type Storage interface {
- [ScyllaDB](./scylladb/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+scylladb%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-scylladb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a>
- [SQLite3](./sqlite3/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a>
- [ClickHouse](./clickhouse/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Clickhouse%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-clickhouse.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a>
- [Valkey](./valkey/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+valkey%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-valkey.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a>

View File

@@ -1,5 +1,5 @@
# Coherence
<!-- Copyright © 2023, Oracle and/or its affiliates. -->
<!-- Copyright © 2023, 2025 Oracle and/or its affiliates. -->
A Coherence storage driver using [https://github.com/oracle/coherence-go-client](https://github.com/oracle/coherence-go-client).
### Table of Contents
@@ -35,10 +35,10 @@ necessary for the client to operate correctly.
To start a Coherence cluster using Docker, issue the following:
```bash
docker run -d -p 1408:1408 ghcr.io/oracle/coherence-ce:22.06.7
docker run -d -p 1408:1408 ghcr.io/oracle/coherence-ce:24.09
```
See the documentation [here](https://pkg.go.dev/github.com/oracle/coherence-go-client/coherence#hdr-Obtaining_a_Session) on connection options
See the documentation [here](https://pkg.go.dev/github.com/oracle/coherence-go-client/v2@v2.0.0/coherence#hdr-Obtaining_a_Session) on connection options
when creating a Coherence session.
### Examples

View File

@@ -1,13 +1,13 @@
package coherence
/*
* Copyright © 2023, 2024 Oracle and/or its affiliates.
* Copyright © 2023, 2025 Oracle and/or its affiliates.
*/
import (
"context"
"crypto/tls"
"fmt"
coh "github.com/oracle/coherence-go-client/coherence"
coh "github.com/oracle/coherence-go-client/v2/coherence"
"time"
)

View File

@@ -3,7 +3,7 @@ module github.com/gofiber/storage/coherence
go 1.19
require (
github.com/oracle/coherence-go-client v1.2.2
github.com/oracle/coherence-go-client/v2 v2.0.0
github.com/stretchr/testify v1.9.0
)
@@ -18,9 +18,11 @@ require (
require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.1 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/grpc v1.58.3 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)

View File

@@ -9,21 +9,24 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
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/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
github.com/oracle/coherence-go-client v1.2.2 h1:TGK87WhV8MWeCiZKk0rC+aZbt40p2nRVvxDUbF+2gX8=
github.com/oracle/coherence-go-client v1.2.2/go.mod h1:8wy6v4KvDGJv6iIiCD95aU0g8UL34DaKRHs3zqQN/Bg=
github.com/oracle/coherence-go-client/v2 v2.0.0 h1:epRtq50pHgW0Wbl7piSPdDbwE3JVe+9XFyTS+j0YmEI=
github.com/oracle/coherence-go-client/v2 v2.0.0/go.mod h1:tiCK6dVyBf/GVabOPY73Cl6+eKoLtStx/uWEEdJfpKg=
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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
@@ -35,6 +38,7 @@ google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGm
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -44,7 +44,9 @@ func New(config Config) *Storage {
}
// Create db
sess := awsdynamodb.NewFromConfig(awscfg)
sess := awsdynamodb.NewFromConfig(awscfg, func(o *awsdynamodb.Options) {
o.BaseEndpoint = aws.String(cfg.Endpoint)
})
timeoutCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
@@ -232,23 +234,10 @@ func (s *Storage) requestContext() (context.Context, context.CancelFunc) {
}
func returnAWSConfig(cfg Config) (aws.Config, error) {
endpoint := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
if cfg.Endpoint != "" {
return aws.Endpoint{
PartitionID: "aws",
URL: cfg.Endpoint,
SigningRegion: cfg.Region,
HostnameImmutable: true,
}, nil
}
return aws.Endpoint{}, &aws.EndpointNotFoundError{}
})
if cfg.Credentials != (Credentials{}) {
credentials := credentials.NewStaticCredentialsProvider(cfg.Credentials.AccessKey, cfg.Credentials.SecretAccessKey, "")
return awsconfig.LoadDefaultConfig(context.TODO(),
awsconfig.WithRegion(cfg.Region),
awsconfig.WithEndpointResolverWithOptions(endpoint),
awsconfig.WithCredentialsProvider(credentials),
awsconfig.WithRetryer(func() aws.Retryer {
return retry.AddWithMaxAttempts(retry.NewStandard(), cfg.MaxAttempts)
@@ -258,7 +247,6 @@ func returnAWSConfig(cfg Config) (aws.Config, error) {
return awsconfig.LoadDefaultConfig(context.TODO(),
awsconfig.WithRegion(cfg.Region),
awsconfig.WithEndpointResolverWithOptions(endpoint),
awsconfig.WithRetryer(func() aws.Retryer {
return retry.AddWithMaxAttempts(retry.NewStandard(), cfg.MaxAttempts)
}),

View File

@@ -75,6 +75,7 @@ func (s *Storage) Get(key string) ([]byte, error) {
if err != nil {
return nil, err
}
defer object.Close()
// convert to byte
bb := bytebufferpool.Get()

View File

@@ -17,8 +17,8 @@ require (
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

View File

@@ -25,8 +25,8 @@ go.mongodb.org/mongo-driver v1.16.1/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd8
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
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=
@@ -34,8 +34,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -48,8 +48,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=

View File

@@ -40,7 +40,10 @@ func New(config ...Config) *Storage {
panic(fmt.Sprintf("unable to load SDK config, %v", err))
}
sess := s3.NewFromConfig(awscfg)
sess := s3.NewFromConfig(awscfg, func(o *s3.Options) {
o.BaseEndpoint = aws.String(cfg.Endpoint)
})
storage := &Storage{
svc: sess,
downloader: manager.NewDownloader(sess),
@@ -173,23 +176,10 @@ func (s *Storage) requestContext() (context.Context, context.CancelFunc) {
}
func returnAWSConfig(cfg Config) (aws.Config, error) {
endpoint := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
if cfg.Endpoint != "" {
return aws.Endpoint{
PartitionID: "aws",
URL: cfg.Endpoint,
SigningRegion: cfg.Region,
HostnameImmutable: true,
}, nil
}
return aws.Endpoint{}, &aws.EndpointNotFoundError{}
})
if cfg.Credentials != (Credentials{}) {
creds := credentials.NewStaticCredentialsProvider(cfg.Credentials.AccessKey, cfg.Credentials.SecretAccessKey, "")
return awsconfig.LoadDefaultConfig(context.TODO(),
awsconfig.WithRegion(cfg.Region),
awsconfig.WithEndpointResolverWithOptions(endpoint),
awsconfig.WithCredentialsProvider(creds),
awsconfig.WithRetryer(func() aws.Retryer {
return retry.AddWithMaxAttempts(retry.NewStandard(), cfg.MaxAttempts)
@@ -199,7 +189,6 @@ func returnAWSConfig(cfg Config) (aws.Config, error) {
return awsconfig.LoadDefaultConfig(context.TODO(),
awsconfig.WithRegion(cfg.Region),
awsconfig.WithEndpointResolverWithOptions(endpoint),
awsconfig.WithRetryer(func() aws.Retryer {
return retry.AddWithMaxAttempts(retry.NewStandard(), cfg.MaxAttempts)
}),

222
valkey/README.md Normal file
View File

@@ -0,0 +1,222 @@
---
id: valkey
title: Valkey
---
![Release](https://img.shields.io/github/v/tag/gofiber/storage?filter=valkey*)
[![Discord](https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7)](https://gofiber.io/discord)
![Test](https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-valkey.yml?label=Tests)
![Security](https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security)
![Linter](https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter)
A fast Valkey Storage that does auto pipelining and supports client side caching. Implementation is based on [valkey-io/valkey](https://github.com/valkey-io/valkey-go).
### Table of Contents
- [Signatures](#signatures)
- [Installation](#installation)
- [Examples](#examples)
- [Config](#config)
- [Default Config](#default-config)
### Signatures
```go
func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() valkey.Client
```
### Installation
The valkey driver is tested on the latest two [Go version](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
```bash
go mod init github.com/<user>/<repo>
```
And then install the valkey implementation:
```bash
go get github.com/gofiber/storage/valkey
```
### Examples
Import the storage package.
```go
import "github.com/gofiber/storage/valkey"
```
You can use the one of the following options to create a Valkey Storage:
```go
// Initialize default config (localhost:6379)
store := valkey.New()
// Initialize custom config
store := valkey.New(valkey.Config{
InitAddress: []string{"localhost:6380"},
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
})
// Initialize using Redis-style URL
store := valkey.New(valkey.Config{
URL: "redis://localhost:6379",
})
// Initialize Valkey Cluster Client
store := valkey.New(valkey.Config{
InitAddress: []string{":6379", ":6380"},
})
// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = valkey.New(valkey.Config{
InitAddress: []string{"localhost:6380"},
Username: "<user>",
Password: "<password>",
SelectDB: 0,
TLSConfig: tlsCfg,
})
```
### Config
```go
type Config struct {
// Server username
//
// Optional. Default is ""
Username string
// Server password
//
// Optional. Default is ""
Password string
// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string
// URL standard format Redis-style URL. If this is set all other config options, InitAddress, Username, Password, ClientName, and SelectDB have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string
// SelectDB to be selected after connecting to the server.
//
// Optional. Default is 0
SelectDB int
// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{"127.0.0.1:6379"}
InitAddress []string
// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config
// CacheSizeEachConn is valkey client side cache size that bind to each TCP connection to a single valkey instance.
//
// Optional. The default is DefaultCacheBytes: 128 * (1 << 20)
CacheSizeEachConn int
// RingScaleEachConn sets the size of the ring buffer in each connection to (2 ^ RingScaleEachConn).
//
// Optional. The default is RingScaleEachConn, which results into having a ring of size 2^10 for each connection.
RingScaleEachConn int
// ReadBufferEachConn is the size of the bufio.NewReaderSize for each connection, default to DefaultReadBuffer (0.5 MiB).
//
// Optional. The default is DefaultReadBuffer: 1 << 19
ReadBufferEachConn int
// WriteBufferEachConn is the size of the bufio.NewWriterSize for each connection, default to DefaultWriteBuffer (0.5 MiB).
//
// Optional. The default is DefaultWriteBuffer: 1 << 19
WriteBufferEachConn int
// BlockingPoolSize is the size of the connection pool shared by blocking commands (ex BLPOP, XREAD with BLOCK).
//
// Optional. The default is DefaultPoolSize: 1000
BlockingPoolSize int
// PipelineMultiplex determines how many tcp connections used to pipeline commands to one valkey instance.
//
// Optional. The default for single and sentinel clients is 2, which means 4 connections (2^2).
PipelineMultiplex int
// DisableRetry disables retrying read-only commands under network errors
//
// Optional. The default is False
DisableRetry bool
// DisableCache falls back Client.DoCache/Client.DoMultiCache to Client.Do/Client.DoMulti
//
// Optional. The default is false
DisableCache bool
// AlwaysPipelining makes valkey.Client always pipeline valkey commands even if they are not issued concurrently.
//
// Optional. The default is true
AlwaysPipelining bool
// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool
// CacheTTL TTL
//
// Optional. Default is time.Minute
CacheTTL time.Duration
}
```
### Default Config
```go
var ConfigDefault = Config{
Username: "",
Password: "",
ClientName: "",
SelectDB: 0,
InitAddress: []string{"127.0.0.1:6379"},
TLSConfig: nil,
CacheSizeEachConn: valkey.DefaultCacheBytes,
RingScaleEachConn: valkey.DefaultRingScale,
ReadBufferEachConn: valkey.DefaultReadBuffer,
WriteBufferEachConn: valkey.DefaultWriteBuffer,
BlockingPoolSize: valkey.DefaultPoolSize,
PipelineMultiplex: 2,
DisableRetry: false,
DisableCache: false,
AlwaysPipelining: true,
Reset: false,
CacheTTL: time.Minute,
}
```

198
valkey/config.go Normal file
View File

@@ -0,0 +1,198 @@
package valkey
import (
"crypto/tls"
"time"
"github.com/valkey-io/valkey-go"
)
// Config defines the config for storage.
type Config struct {
// Server username
//
// Optional. Default is ""
Username string
// Server password
//
// Optional. Default is ""
Password string
// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string
// URL standard format Redis URL. If this is set all other config options, InitAddress, Username, Password, ClientName, and SelectDB have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string
// SelectDB to be selected after connecting to the server.
//
// Optional. Default is 0
SelectDB int
// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{"127.0.0.1:6379"}
InitAddress []string
// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config
// CacheSizeEachConn is redis client side cache size that bind to each TCP connection to a single redis instance.
//
// Optional. The default is DefaultCacheBytes: 128 * (1 << 20)
CacheSizeEachConn int
// RingScaleEachConn sets the size of the ring buffer in each connection to (2 ^ RingScaleEachConn).
//
// Optional. The default is RingScaleEachConn, which results into having a ring of size 2^10 for each connection.
RingScaleEachConn int
// ReadBufferEachConn is the size of the bufio.NewReaderSize for each connection, default to DefaultReadBuffer (0.5 MiB).
//
// Optional. The default is DefaultReadBuffer: 1 << 19
ReadBufferEachConn int
// WriteBufferEachConn is the size of the bufio.NewWriterSize for each connection, default to DefaultWriteBuffer (0.5 MiB).
//
// Optional. The default is DefaultWriteBuffer: 1 << 19
WriteBufferEachConn int
// BlockingPoolSize is the size of the connection pool shared by blocking commands (ex BLPOP, XREAD with BLOCK).
//
// Optional. The default is DefaultPoolSize: 1000
BlockingPoolSize int
// PipelineMultiplex determines how many tcp connections used to pipeline commands to one redis instance.
//
// Optional. The default for single and sentinel clients is 2, which means 4 connections (2^2).
PipelineMultiplex int
// DisableRetry disables retrying read-only commands under network errors
//
// Optional. The default is False
DisableRetry bool
// DisableCache falls back Client.DoCache/Client.DoMultiCache to Client.Do/Client.DoMulti
//
// Optional. The default is false
DisableCache bool
// AlwaysPipelining makes valkey.Client always pipeline redis commands even if they are not issued concurrently.
//
// Optional. The default is true
AlwaysPipelining bool
// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool
// CacheTTL TTL
//
// Optional. Default is time.Minute
CacheTTL time.Duration
}
// ConfigDefault is the default config
var ConfigDefault = Config{
Username: "",
Password: "",
ClientName: "",
URL: "",
SelectDB: 0,
InitAddress: []string{"127.0.0.1:6379"},
TLSConfig: nil,
CacheSizeEachConn: valkey.DefaultCacheBytes,
RingScaleEachConn: valkey.DefaultRingScale,
ReadBufferEachConn: valkey.DefaultReadBuffer,
WriteBufferEachConn: valkey.DefaultWriteBuffer,
BlockingPoolSize: valkey.DefaultPoolSize,
PipelineMultiplex: 2,
DisableRetry: false,
DisableCache: false,
AlwaysPipelining: true,
Reset: false,
CacheTTL: time.Minute,
}
// Helper function to set default values
func configDefault(config ...Config) Config {
// Return default config if nothing provided
if len(config) < 1 {
return ConfigDefault
}
// Start with the default configuration
cfg := ConfigDefault
// Override default config with values from provided config
userConfig := config[0]
if userConfig.Username != "" {
cfg.Username = userConfig.Username
}
if userConfig.Password != "" {
cfg.Password = userConfig.Password
}
if userConfig.ClientName != "" {
cfg.ClientName = userConfig.ClientName
}
if userConfig.URL != "" {
cfg.URL = userConfig.URL
}
if userConfig.SelectDB != 0 {
cfg.SelectDB = userConfig.SelectDB
}
if len(userConfig.InitAddress) > 0 {
cfg.InitAddress = userConfig.InitAddress
}
if userConfig.TLSConfig != nil {
cfg.TLSConfig = userConfig.TLSConfig
}
if userConfig.CacheSizeEachConn != 0 {
cfg.CacheSizeEachConn = userConfig.CacheSizeEachConn
}
if userConfig.RingScaleEachConn != 0 {
cfg.RingScaleEachConn = userConfig.RingScaleEachConn
}
if userConfig.ReadBufferEachConn != 0 {
cfg.ReadBufferEachConn = userConfig.ReadBufferEachConn
}
if userConfig.WriteBufferEachConn != 0 {
cfg.WriteBufferEachConn = userConfig.WriteBufferEachConn
}
if userConfig.BlockingPoolSize != 0 {
cfg.BlockingPoolSize = userConfig.BlockingPoolSize
}
if userConfig.PipelineMultiplex != 0 {
cfg.PipelineMultiplex = userConfig.PipelineMultiplex
}
if userConfig.CacheTTL != time.Second {
cfg.CacheTTL = userConfig.CacheTTL
}
if userConfig.DisableRetry {
cfg.DisableRetry = true
}
if userConfig.DisableCache {
cfg.DisableCache = true
}
if userConfig.AlwaysPipelining {
cfg.AlwaysPipelining = true
}
if userConfig.Reset {
cfg.Reset = true
}
return cfg
}

18
valkey/go.mod Normal file
View File

@@ -0,0 +1,18 @@
module github.com/gofiber/storage/valkey
go 1.23
require (
github.com/gofiber/utils/v2 v2.0.0-beta.4
github.com/stretchr/testify v1.9.0
github.com/valkey-io/valkey-go v1.0.52
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sys v0.24.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

33
valkey/go.sum Normal file
View File

@@ -0,0 +1,33 @@
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/gofiber/utils/v2 v2.0.0-beta.4 h1:1gjbVFFwVwUb9arPcqiB6iEjHBwo7cHsyS41NeIW3co=
github.com/gofiber/utils/v2 v2.0.0-beta.4/go.mod h1:sdRsPU1FXX6YiDGGxd+q2aPJRMzpsxdzCXo9dz+xtOY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/valkey-io/valkey-go v1.0.52 h1:ojrR736satGucqpllYzal8fUrNNROc11V10zokAyIYg=
github.com/valkey-io/valkey-go v1.0.52/go.mod h1:BXlVAPIL9rFQinSFM+N32JfWzfCaUAqBpZkc4vPY6fM=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

135
valkey/valkey.go Normal file
View File

@@ -0,0 +1,135 @@
package valkey
import (
"context"
"time"
"github.com/gofiber/utils/v2"
"github.com/valkey-io/valkey-go"
)
var cacheTTL = time.Second
// Storage interface that is implemented by storage providers
type Storage struct {
db valkey.Client
}
// New creates a new valkey storage
func New(config ...Config) *Storage {
// Set default config
cfg := configDefault(config...)
// Create new valkey client
var db valkey.Client
cacheTTL = cfg.CacheTTL
// Parse the URL and update config values accordingly
if cfg.URL != "" {
// This will panic if parsing URL fails
options := valkey.MustParseURL(cfg.URL)
// Update the config values with the parsed URL values
cfg.InitAddress = options.InitAddress
cfg.Username = options.Username
cfg.Password = options.Password
cfg.SelectDB = options.SelectDB
// Update ClientName if returned
if cfg.ClientName == "" && options.ClientName != "" {
cfg.ClientName = options.ClientName
}
// Update TLSConfig if returned
if cfg.TLSConfig == nil && options.TLSConfig != nil {
cfg.TLSConfig = options.TLSConfig
}
}
// Update config values accordingly and start new Client
db, err := valkey.NewClient(valkey.ClientOption{
Username: cfg.Username,
Password: cfg.Password,
ClientName: cfg.ClientName,
SelectDB: cfg.SelectDB,
InitAddress: cfg.InitAddress,
TLSConfig: cfg.TLSConfig,
CacheSizeEachConn: cfg.CacheSizeEachConn,
RingScaleEachConn: cfg.RingScaleEachConn,
ReadBufferEachConn: cfg.ReadBufferEachConn,
WriteBufferEachConn: cfg.WriteBufferEachConn,
BlockingPoolSize: cfg.BlockingPoolSize,
PipelineMultiplex: cfg.PipelineMultiplex,
DisableRetry: cfg.DisableRetry,
DisableCache: cfg.DisableCache,
AlwaysPipelining: cfg.AlwaysPipelining,
})
if err != nil {
panic(err)
}
// Test connection
if err := db.Do(context.Background(), db.B().Ping().Build()).Error(); err != nil {
panic(err)
}
// Empty collection if Clear is true
if cfg.Reset {
if err := db.Do(context.Background(), db.B().Flushdb().Build()).Error(); err != nil {
panic(err)
}
}
// Create new store
return &Storage{
db: db,
}
}
// Get value by key
func (s *Storage) Get(key string) ([]byte, error) {
if len(key) <= 0 {
return nil, nil
}
val, err := s.db.DoCache(context.Background(), s.db.B().Get().Key(key).Cache(), cacheTTL).AsBytes()
if err != nil && valkey.IsValkeyNil(err) {
return nil, nil
}
return val, err
}
// Set key with value
func (s *Storage) Set(key string, val []byte, exp time.Duration) error {
if len(key) <= 0 || len(val) <= 0 {
return nil
}
if exp > 0 {
return s.db.Do(context.Background(), s.db.B().Set().Key(key).Value(utils.ToString(val)).Ex(exp).Build()).Error()
} else {
return s.db.Do(context.Background(), s.db.B().Set().Key(key).Value(utils.ToString(val)).Build()).Error()
}
}
// Delete key by key
func (s *Storage) Delete(key string) error {
if len(key) <= 0 {
return nil
}
return s.db.Do(context.Background(), s.db.B().Del().Key(key).Build()).Error()
}
// Reset all keys
func (s *Storage) Reset() error {
return s.db.Do(context.Background(), s.db.B().Flushdb().Build()).Error()
}
// Close the database
func (s *Storage) Close() error {
s.db.Close()
return nil
}
// Return database client
func (s *Storage) Conn() valkey.Client {
return s.db
}

277
valkey/valkey_test.go Normal file
View File

@@ -0,0 +1,277 @@
package valkey
import (
"crypto/tls"
"log"
"testing"
"time"
"github.com/stretchr/testify/require"
)
var testStore = New(Config{
Reset: true,
})
func Test_Valkey_Set(t *testing.T) {
var (
key = "john"
val = []byte("doe")
)
err := testStore.Set(key, val, 0)
require.NoError(t, err)
}
func Test_Valkey_Set_Override(t *testing.T) {
var (
key = "john"
val = []byte("doe")
)
err := testStore.Set(key, val, 0)
require.NoError(t, err)
err = testStore.Set(key, val, 0)
require.NoError(t, err)
}
func Test_Valkey_Get(t *testing.T) {
var (
key = "john"
val = []byte("doe")
)
err := testStore.Set(key, val, 0)
require.NoError(t, err)
result, err := testStore.Get(key)
require.NoError(t, err)
require.Equal(t, val, result)
}
func Test_Valkey_Set_Expiration(t *testing.T) {
var (
key = "john"
val = []byte("doe")
exp = 1 * time.Second
)
err := testStore.Set(key, val, exp)
require.NoError(t, err)
time.Sleep(1100 * time.Millisecond)
}
func Test_Valkey_Get_Expired(t *testing.T) {
key := "john"
result, err := testStore.Get(key)
require.NoError(t, err)
require.Zero(t, len(result))
}
func Test_Valkey_Get_NotExist(t *testing.T) {
result, err := testStore.Get("notexist")
require.NoError(t, err)
require.Zero(t, len(result))
}
func Test_Valkey_Delete(t *testing.T) {
var (
key = "john"
val = []byte("doe")
)
err := testStore.Set(key, val, 0)
require.NoError(t, err)
err = testStore.Delete(key)
require.NoError(t, err)
result, err := testStore.Get(key)
require.NoError(t, err)
require.Zero(t, len(result))
}
func Test_Valkey_Reset(t *testing.T) {
val := []byte("doe")
err := testStore.Set("john1", val, 0)
require.NoError(t, err)
err = testStore.Set("john2", val, 0)
require.NoError(t, err)
err = testStore.Reset()
require.NoError(t, err)
result, err := testStore.Get("john1")
require.NoError(t, err)
require.Zero(t, len(result))
result, err = testStore.Get("john2")
require.NoError(t, err)
require.Zero(t, len(result))
}
func Test_Valkey_Close(t *testing.T) {
require.Nil(t, testStore.Close())
}
func Test_Valkey_Conn(t *testing.T) {
require.True(t, testStore.Conn() != nil)
}
func Test_Valkey_WithTLS(t *testing.T) {
cer, err := tls.LoadX509KeyPair("/home/runner/work/storage/storage/tls/client.crt", "/home/runner/work/storage/storage/tls/client.key")
if err != nil {
log.Println(err)
require.NoError(t, err)
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256},
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
tls.TLS_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_RSA_WITH_AES_256_CBC_SHA,
},
}
storeTLS := New(Config{
InitAddress: []string{"localhost:6380"},
TLSConfig: tlsCfg,
})
var (
key = "clark"
val = []byte("kent")
)
err = storeTLS.Set(key, val, 0)
require.NoError(t, err)
result, err := storeTLS.Get(key)
require.NoError(t, err)
require.Equal(t, val, result)
err = storeTLS.Delete(key)
require.NoError(t, err)
require.Nil(t, storeTLS.Close())
}
func Test_Valkey_With_HostPort(t *testing.T) {
store := New(Config{
InitAddress: []string{"localhost:6379"},
})
var (
key = "bruce"
val = []byte("wayne")
)
err := store.Set(key, val, 0)
require.NoError(t, err)
result, err := store.Get(key)
require.NoError(t, err)
require.Equal(t, val, result)
err = store.Delete(key)
require.NoError(t, err)
require.Nil(t, store.Close())
}
func Test_Valkey_With_URL(t *testing.T) {
store := New(Config{
URL: "redis://localhost:6379",
})
var (
key = "bruce"
val = []byte("wayne")
)
err := store.Set(key, val, 0)
require.NoError(t, err)
result, err := store.Get(key)
require.NoError(t, err)
require.Equal(t, val, result)
err = store.Delete(key)
require.NoError(t, err)
require.Nil(t, store.Close())
}
func Test_Valkey_Cluster(t *testing.T) {
store := New(Config{
InitAddress: []string{
"localhost:7000",
"localhost:7001",
"localhost:7002",
"localhost:7003",
"localhost:7004",
"localhost:7005",
},
})
var (
key = "bruce"
val = []byte("wayne")
)
err := store.Set(key, val, 0)
require.NoError(t, err)
result, err := store.Get(key)
require.NoError(t, err)
require.Equal(t, val, result)
err = store.Delete(key)
require.NoError(t, err)
require.Nil(t, store.Close())
}
func Benchmark_Valkey_Set(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()
var err error
for i := 0; i < b.N; i++ {
err = testStore.Set("john", []byte("doe"), 0)
}
require.NoError(b, err)
}
func Benchmark_Valkey_Get(b *testing.B) {
err := testStore.Set("john", []byte("doe"), 0)
require.NoError(b, err)
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
_, err = testStore.Get("john")
}
require.NoError(b, err)
}
func Benchmark_Valkey_SetAndDelete(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()
var err error
for i := 0; i < b.N; i++ {
_ = testStore.Set("john", []byte("doe"), 0)
err = testStore.Delete("john")
}
require.NoError(b, err)
}