Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NATS Jetstream KV Store implementation #197

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

vokey
Copy link

@vokey vokey commented Nov 17, 2024

Hi Philipp,

the gokv library is fantastic and easy-to-use. I've contributed an implementation for the NATS Jetstream KV store. NATS is a high-performance, increasingly popular distributed messaging system, I believe this addition could be valuable. I would greatly appreciate it if you would consider merging it into the project.

Signed-off-by: Vokey <code@vokeylee.com>
… methods

Signed-off-by: Vokey <code@vokeylee.com>
The test uses an embedded nats server to simplify the test procedure.

Signed-off-by: Vokey <code@vokeylee.com>
Signed-off-by: Vokey <code@vokeylee.com>
…tion comments

Signed-off-by: Vokey <code@vokeylee.com>
Signed-off-by: Vokey <code@vokeylee.com>
@vokey vokey marked this pull request as ready for review November 17, 2024 08:34
return err
}

ctxWithTimeout, cancel := context.WithTimeout(context.TODO(), c.timeout) // Use TODO since context is not available yet.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the issue comment at #136 (comment), the operation timeout is configured in the Client settings currently, and you're considering changing the interface and using context to set the timeout in a future version.
Therefore, I have used context.TODO as the parent context as a placeholder.

var ts *server.Server

// TestMain initializes the embedded nats server and runs the tests.
func TestMain(m *testing.M) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used an embedded sever to simplify the test procedure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant