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 extended purge #739

Merged
merged 2 commits into from Nov 23, 2022
Merged

Add extended purge #739

merged 2 commits into from Nov 23, 2022

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Nov 21, 2022

No description provided.

@Jarema Jarema marked this pull request as ready for review November 22, 2022 11:38
@Jarema
Copy link
Member Author

Jarema commented Nov 22, 2022

addresses nats-io/nats-architecture-and-design#4

@caspervonb
Copy link
Collaborator

caspervonb commented Nov 22, 2022

I've got a slightly different approach in mind, still using a builder but into_future to make it look like a single async call chain. Will raise a competing PR shortly.

@Jarema Jarema force-pushed the jarema/extended-purge-api branch 4 times, most recently from ac65c5a to 006d40e Compare November 23, 2022 14:30
Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

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

Spot on to what I had in mind, digging this! Raising the same for request today 😁

Some nitpicky nits

@@ -470,6 +470,34 @@ mod jetstream {

assert_eq!(stream.info().await.unwrap().state.messages, 3);
}
#[tokio::test]
async fn send_purge() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
async fn send_purge() {
async fn purge() {

async-nats/src/jetstream/stream.rs Outdated Show resolved Hide resolved
SEQUENCE: ToAssign,
KEEP: ToAssign,
{
stream: crate::jetstream::stream::Stream,
Copy link
Collaborator

Choose a reason for hiding this comment

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

You're in the same scope here?

Suggested change
stream: crate::jetstream::stream::Stream,
stream: Stream,

async-nats/src/jetstream/stream.rs Outdated Show resolved Hide resolved
async-nats/src/jetstream/stream.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

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

lgtm

@Jarema Jarema merged commit 52d0ea3 into main Nov 23, 2022
@Jarema Jarema deleted the jarema/extended-purge-api branch November 23, 2022 21:59
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

2 participants