feat: Add Status constructors#137
Merged
LucioFranco merged 4 commits intohyperium:masterfrom Nov 15, 2019
Merged
Conversation
Add convenience constructors for all Status codes and document all Code variants. Implement From tokio::timer::timeout::Elapsed for Status
LucioFranco
reviewed
Nov 14, 2019
tonic/src/status.rs
Outdated
| const GRPC_STATUS_MESSAGE_HEADER: &str = "grpc-message"; | ||
| const GRPC_STATUS_DETAILS_HEADER: &str = "grpc-status-details-bin"; | ||
|
|
||
| // Standard status codes |
LucioFranco
reviewed
Nov 14, 2019
LucioFranco
reviewed
Nov 14, 2019
LucioFranco
reviewed
Nov 14, 2019
Member
LucioFranco
left a comment
There was a problem hiding this comment.
This looks fantastic!! Few comments but otherwise I think this is ready!
Member
|
@alce I think not having the elasped one is fine for now. |
Co-Authored-By: Lucio Franco <luciofranco14@gmail.com>
LucioFranco
approved these changes
Nov 15, 2019
Status constructors
rabbitinspace
pushed a commit
to satelit-project/tonic
that referenced
this pull request
Jan 1, 2020
Co-Authored-By: Lucio Franco <luciofranco14@gmail.com>
brentalanmiller
pushed a commit
to brentalanmiller/tonic
that referenced
this pull request
Oct 6, 2023
* deps: update to rustls 0.21.0.
This commit updates tokio-rustls to use the freshly released Rustls
0.21.0 release tag, and the rustls-webpki fork of webpki.
* tests: improve server wait in early data test.
Previously the `test_0rtt` test had a hardcoded 1s sleep waiting for an
`openssl s_server` process to become ready.
If 1s waiting wasn't long enough, the test could fail with an error
like:
```
Error: Os { code: 10061, kind: ConnectionRefused, message: "No
connection could be made because the target machine actively refused
it." }
```
This commit replaces the hardcoded sleep with a sleep loop that
gradually increases the delay time up to a fixed maximum. This makes the
test run faster when the server is ready quickly and prevents an error
if it takes longer than 1s to stabilize.
* version: 0.23.4 -> 0.24.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds shortcut constructors for all Status codes as well as documentation for all Code variants.
From<tokio::timer::timeout::Elapsed>for Status is also implemented, which is useful for the in-progress revamp of request timeouts.Edit: the
From<Elapsed> for Statusdoes not compile when the transport feature is disabled. Without it, there is no tokio available. I removed the implementation for now.