-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(server): remove server::conn::{Http, Connection}
types
#3013
Merged
Conversation
This file contains 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
seanmonstar
force-pushed
the
remove-server-conn-combo
branch
from
October 14, 2022 20:45
092ff40
to
caec5ab
Compare
The connection types have been split into version-specific types, in the `server::conn::{http1, http2}` modules. BREAKING CHANGE: Either choose a version-specific `Connection` type, or look for the auto-version type in `hyper-util`.
seanmonstar
force-pushed
the
remove-server-conn-combo
branch
from
October 17, 2022 15:13
caec5ab
to
742e4e7
Compare
yukiiiteru
added a commit
to cloudwego/volo
that referenced
this pull request
Nov 24, 2023
Note that `hyper` v1.0.0-rc4 replaces IO traits from `tokio` with its IO traits in `hyper::rt`. To solve the building problem, we can introduce `TokioIo` from `hyper-util` and wrap the `DefaultIncoming` by the `TokioIo`. Also, the `volo-grpc` uses `hyper` v0.14 with its auto-version (using both http1 and http2) and graceful shutdown, but the latest `hyper` and `hyper-util` cannot use the both features at the same time, so the version of `hyper` in `volo` has not been upgraded. Ref: - hyperium/hyper@f9f65b7 - hyperium/hyper#3013 - hyperium/hyper#2862 Signed-off-by: Yu Li <[email protected]>
yukiiiteru
added a commit
to cloudwego/volo
that referenced
this pull request
Nov 27, 2023
Note that `hyper` v1.0.0-rc4 replaces IO traits from `tokio` with its IO traits in `hyper::rt`. To solve the building problem, we can introduce `TokioIo` from `hyper-util` and wrap the `DefaultIncoming` by the `TokioIo`. Also, the `volo-grpc` uses `hyper` v0.14 with its auto-version (using both http1 and http2) and graceful shutdown, but the latest `hyper` and `hyper-util` cannot use the both features at the same time, so the version of `hyper` in `volo` has not been upgraded. Ref: - hyperium/hyper@f9f65b7 - hyperium/hyper#3013 - hyperium/hyper#2862 Signed-off-by: Yu Li <[email protected]>
yukiiiteru
added a commit
to cloudwego/volo
that referenced
this pull request
Nov 27, 2023
Note that `hyper` v1.0.0-rc4 replaces IO traits from `tokio` with its IO traits in `hyper::rt`. To solve the building problem, we can introduce `TokioIo` from `hyper-util` and wrap the `DefaultIncoming` by the `TokioIo`. Also, the `volo-grpc` uses `hyper` v0.14 with its auto-version (using both http1 and http2) and graceful shutdown, but the latest `hyper` and `hyper-util` cannot use the both features at the same time, so the version of `hyper` in `volo` has not been upgraded. Ref: - hyperium/hyper@f9f65b7 - hyperium/hyper#3013 - hyperium/hyper#2862 Signed-off-by: Yu Li <[email protected]>
yukiiiteru
added a commit
to cloudwego/volo
that referenced
this pull request
Nov 28, 2023
* feat: introduce volo-http crate * feat(volo-http): introduce route id > The `matchit::Router` cannot be converted to `Iterator`, so using > `matchit::Router<DynService>` is not convenient enough. > To solve the problem, we refer to the implementation of `axum` and > introduce a `RouteId` as a bridge, the `matchit::Router` only handles > some IDs and each ID corresponds to a `DynService`. * feat(volo-http): wrap `DynService` with `Route` > With tie type `Route`, it can support `Service`, `Handler` and so on. * feat(volo-http): make handler more powerful > With this commit, there is no need to keep `HttpContext` in handler > function. Like axum, anything with `FromContext` or `FromRequest` > trait can be used as arguments of a handler. * chore(volo-http): bump to hyper 1.0.0 > Note that `hyper` v1.0.0-rc4 replaces IO traits from `tokio` with its > IO traits in `hyper::rt`. To solve the building problem, we can > introduce `TokioIo` from `hyper-util` and wrap the `DefaultIncoming` > by the `TokioIo`. > > Also, the `volo-grpc` uses `hyper` v0.14 with its auto-version > (using both http1 and http2) and graceful shutdown, but the latest > `hyper` and `hyper-util` cannot use the both features at the same > time, so the version of `hyper` in `volo` has not been upgraded. > > Ref: > - hyperium/hyper@f9f65b7 > - hyperium/hyper#3013 > - hyperium/hyper#2862 * feat(volo-http): support `with_state` * fix(volo-http): fix timeout problem of graceful shutdown > With the previous codes, server could not stop immediately after > pressing Ctrl+C, but waited until timeout before exiting. > > This commit uses the same approach as "volo-thrift" and the problem > has been resolved. * feat(volo-http): support fallback > This commit supports fallback in `Router` and `MethodRouter`. With > `fallback`, when no route or method can handle the request, the > `fallback` will be called and the specified response will be returned. * feat(volo-http): add `TimeoutLayer` with response > This commit adds a `TimeoutLayer` for `volo-http` which can use a > function as a callback and when timeout occurs, it will return a > response by the callback. * chore(volo-http): bump version to `0.1.0` * credits: update license of axum --------- Signed-off-by: Gwo Tzu-Hsing <[email protected]> Signed-off-by: Zheng Li <[email protected]> Signed-off-by: bobozhengsir <[email protected]> Signed-off-by: Yu Li <[email protected]>
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.
The connection types have been split into version-specific types, in the
server::conn::{http1, http2}
modules.BREAKING CHANGE: Either choose a version-specific
Connection
type, orlook for the auto-version type in
hyper-util
.Closes #3012