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 endpoint to receive updates for tables #262

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

somtochiama
Copy link
Contributor

@somtochiama somtochiama commented Oct 22, 2024

This pull request adds a HTTP endpoint /updates/:table that sends future updates about the primary keys of rows have been updated or deleted.

$ curl -X POST http://localhost:8081/v1/updates/todos
{"notify":["update",["some-id-82"]]}
{"notify":["update",["1"]]}
{"notify":["delete",["1"]

@somtochiama somtochiama changed the title Add endpoint to receive updates for public keys Add endpoint to receive updates for tables Oct 22, 2024
crates/corro-types/src/updates.rs Outdated Show resolved Hide resolved
crates/corro-api-types/src/lib.rs Outdated Show resolved Hide resolved
crates/corro-types/src/pubsub.rs Outdated Show resolved Hide resolved
crates/corro-types/src/pubsub.rs Outdated Show resolved Hide resolved
crates/corro-types/src/updates.rs Outdated Show resolved Hide resolved
crates/corro-types/src/updates.rs Outdated Show resolved Hide resolved
crates/corro-types/src/updates.rs Show resolved Hide resolved
crates/corro-types/src/updates.rs Outdated Show resolved Hide resolved
@somtochiama somtochiama marked this pull request as ready for review October 29, 2024 10:34
Copy link
Member

@jeromegn jeromegn left a comment

Choose a reason for hiding this comment

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

Outlined a few changes that can help reduce complexity and make it more efficient. It's looking pretty good though!

crates/corro-agent/src/api/public/update.rs Outdated Show resolved Hide resolved
crates/corro-types/src/updates.rs Outdated Show resolved Hide resolved
crates/corro-types/src/updates.rs Outdated Show resolved Hide resolved
crates/corro-types/src/updates.rs Outdated Show resolved Hide resolved
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.

2 participants