-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
) This commit refactors `ClientBuilder`, `Target` and `CallOpt`. `ClientBuilder` - `ClientBuilder::caller_name` and `ClientBuilder::callee_name` are renamed to `ClientBuilder::user_agent` and `ClientBuilder::default_host` - `ClientBuilder::build` will add some default layers - `Timeout`: Apply current timeout for the request - `Host`: `Target::gen_host` is removed and `Host` will not be inserted to request headers by default. This layer can insert it if there is no `Host` - `UserAgent`: Insert `User-Agent` to request headers - Add `ClientBuilder::build_without_extra_layers` for create a client without the above layers - `ClientBuilder` related methods will not return `Result`, error will be recorded and thrown in `build` or `build_without_extra_layers` `Target` - Remove `https: bool` field, use `scheme: Scheme` instead - Remove `TargetParser` and `parse_target`, use `volo::client::Apply` instead - Remove `gen_host`, use `Host` layer instead `CallOpt` - `CallOpt` uses the same usage as Volo-Thrift, `RequestBuilder::with_callopt` will create a `WithOptService` for using it - Due to the above reason, it will no longer depend on `TargetParser` Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
- Loading branch information
1 parent
d6af79e
commit 9cd838e
Showing
19 changed files
with
1,607 additions
and
1,383 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.