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

feat(unstable): kv.watch() #21147

Merged
merged 9 commits into from
Dec 5, 2023
Merged

feat(unstable): kv.watch() #21147

merged 9 commits into from
Dec 5, 2023

Conversation

lucacasonato
Copy link
Member

This commit adds support for a new kv.watch() method that allows
watching for changes to a key-value pair. This is useful for cases
where you want to be notified when a key-value pair changes, but
don't want to have to poll for changes.

lucacasonato and others added 5 commits November 10, 2023 16:27
This commit adds support for a new `kv.watch()` method that allows
watching for changes to a key-value pair. This is useful for cases
where you want to be notified when a key-value pair changes, but
don't want to have to poll for changes.
@losfair losfair marked this pull request as ready for review December 4, 2023 07:44
@losfair losfair requested a review from igorzi December 4, 2023 10:08
ext/kv/lib.rs Outdated
Comment on lines 396 to 399
let keys = keys
.into_iter()
.map(encode_v8_key)
.collect::<std::io::Result<_>>()?;
Copy link
Contributor

Choose a reason for hiding this comment

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

There should be a limit on the number of keys to watch

Copy link
Member

Choose a reason for hiding this comment

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

Added

@bartlomieju
Copy link
Member

Please land it as feat(unstable): kv.watch()

@losfair losfair changed the title feat(ext/kv): kv.watch() feat(unstable): kv.watch() Dec 5, 2023
@losfair losfair merged commit 74e39a9 into denoland:main Dec 5, 2023
14 checks passed
@lucacasonato lucacasonato deleted the kv_watch branch December 5, 2023 18:58
@thegaryroberts
Copy link

image

bartlomieju pushed a commit that referenced this pull request Dec 5, 2023
This commit adds support for a new `kv.watch()` method that allows
watching for changes to a key-value pair. This is useful for cases
where you want to be notified when a key-value pair changes, but
don't want to have to poll for changes.

---------

Co-authored-by: losfair <[email protected]>
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.

None yet

5 participants