-
Notifications
You must be signed in to change notification settings - Fork 37
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 closing functionality to Viceroy for Handles #65
Conversation
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.
very tiny changes requested, the core of this all seems good to me!
lib/src/session.rs
Outdated
@@ -252,6 +252,23 @@ impl Session { | |||
.ok_or(HandleError::InvalidBodyHandle(handle)) | |||
} | |||
|
|||
/// Drop a [`Body`][body] from the [`Session`], given its [`BodyHandle`][handle]. |
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.
i think we can use intradoc links here 🙂
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.
Oh right I had just copied from what we had before let me fix that up
lib/src/session.rs
Outdated
// Unlike take_body we don't want to call into_body | ||
// as this will cause an InvalidBodyHandle error |
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.
sorry, i have one more nitpick.
could you reword this comment slightly? i was confused for a moment why this would cause an invalid handle error; upon further reading i've realized that you meant this function would return said error because BodyVariant::into_body
will return None
in the streaming case
No worries @cratelyn should be good now |
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.
thank you!!
54ce4d5
to
2ceca65
Compare
This adds the ability for Viceroy to handle closing handles for Response, Request, Body, and StreamingBody Handle types via the close host calls that were added to the public ABI and internally for C@E which has rolled out to the fleet. While this does not include any SDK updates for the tests, I've tested this out with the new version of the Rust SDK to make sure things work out correctly which helped find a bug or with how I implemented it with Viceroy. With this we can still work with old versions of the SDK and handle the new SDK as well. Closes #64
I did a full squash so I can merge with just the one commit @cratelyn and so will need a ♻️ ✔️ |
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.
a pr so nice i approved it twice!
❤️ Thanks @cratelyn |
This adds the ability for Viceroy to handle closing handles for
Response, Request, Body, and StreamingBody Handle types via the close
host calls that were added to the public ABI and internally for C@E
which has rolled out to the fleet. While this does not include any SDK
updates for the tests, I've tested this out with the new version of the
Rust SDK to make sure things work out correctly which helped find a bug
or with how I implemented it with Viceroy. With this we can still work
with old versions of the SDK and handle the new SDK as well.
Closes #64