-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Decouple NATS storage driver from gofiber/fiber #1470
Conversation
WalkthroughThe changes enhance the documentation and configuration of the NATS Key/Value storage driver in Go. They clarify version requirements and improve language consistency. Configuration updates remove logging dependencies and adjust default connection wait times. Additionally, the testing workflow for NATS now includes Go 1.22 and an extended sleep duration before testing. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
nats/go.mod
is excluded by!**/*.mod
nats/go.sum
is excluded by!**/*.sum
,!**/*.sum
Files selected for processing (3)
- nats/README.md (2 hunks)
- nats/config.go (4 hunks)
- nats/nats.go (3 hunks)
Files skipped from review due to trivial changes (2)
- nats/README.md
- nats/config.go
Additional comments not posted (4)
nats/nats.go (4)
41-47
: Approved: SimplifiedconnectHandler
function.The refactoring simplifies the function by reducing its responsibilities. It now focuses solely on initializing
kv
and updatingerr
if necessary.
Line range hint
57-61
:
Approved: RemoveddisconnectErrHandler
function.The removal of this function aligns with the goal of decoupling the
NATS
storage driver from thegofiber/fiber
framework by eliminating embedded logging functions.
73-77
: Approved: RemovederrorHandler
function.The removal of this function aligns with the goal of decoupling the
NATS
storage driver from thegofiber/fiber
framework by eliminating embedded logging functions.
Line range hint
84-95
:
Approved: UpdatednewNatsKV
function.The error handling logic has been updated to return errors directly instead of logging them. This change simplifies the function and aligns with the goal of decoupling the
NATS
storage driver from thegofiber/fiber
framework.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/test-nats.yml (2 hunks)
Additional comments not posted (2)
.github/workflows/test-nats.yml (2)
19-19
: LGTM! Adding Go 1.22.x to the matrix is a good practice.This ensures compatibility with the latest Go version.
33-33
: LGTM! Increasing the sleep duration to 5 seconds ensures proper initialization of the NATS server.This change helps avoid race conditions during testing.
Description
NATS
storage driver from https://github.com/gofiber/fiber by removing thefiberlog
.logger
andverbose
params.Note: This is the only Storage driver that depends on
gofiber/fiber
, removing this dependency will decouple this whole repo fromgofiber/fiber
.Summary by CodeRabbit
Documentation
Configuration
Testing