forked from MaterializeInc/materialize
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http-util: prepare for open-source release as mz-http-proxy
The http_proxy, https_proxy, and no_proxy support we built in the http-util crate will be useful to at least one other person [0], and probably many more. This commit prepares the crate for release to crates.io. Specifically: * The crate is renamed to "mz-http-proxy", for consistency with "mz-avro". * The license headers are updated to indicate the crate is Apache 2.0 licensed. * The adapters are placed behind feature flags, so that you don't need to bring in reqwest if you just want hyper, or vice versa. * The documentation is improved, with a smidge of Materialize branding to boot. I also switched `bin/doc` back to using the nightly toolchain in CI, with support for optionally doing so locally too, to enable the `doc_cfg` attributes that indicate which features must be enabled for which items. [0]: awslabs/aws-sdk-rust#169 (comment)
- Loading branch information
Showing
18 changed files
with
173 additions
and
70 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[package] | ||
name = "mz-http-proxy" | ||
description = "HTTP proxy adapters that respect the system proxy configuration." | ||
authors = ["Materialize, Inc."] | ||
repository = "https://github.com/MaterializeInc/materialize/tree/main/src/http-proxy" | ||
keywords = ["http", "proxy"] | ||
categories = ["network-programming", "web-programming::http-client"] | ||
version = "0.1.0" | ||
license = "Apache-2.0" | ||
edition = "2018" | ||
|
||
[dependencies] | ||
http = "0.2.4" | ||
hyper-dep = { package = "hyper", version = "0.14.11", optional = true } | ||
hyper-proxy = { version = "0.9.1", optional = true } | ||
hyper-tls = { version = "0.5.0", optional = true } | ||
ipnet = "2.3.1" | ||
lazy_static = "1.1.1" | ||
log = "0.4.13" | ||
reqwest = { version = "0.11.4", optional = true } | ||
|
||
[features] | ||
hyper = ["hyper-dep", "hyper-proxy", "hyper-tls"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "nightly_doc_features"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# mz-http-proxy | ||
|
||
[![crates.io](https://img.shields.io/crates/v/mz-http-proxy.svg)](https://crates.io/crates/mz-http-proxy) | ||
[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)][docs] | ||
|
||
HTTP proxy adapters that respect the system's proxy configuration. | ||
|
||
**[View documentation.][docs]** | ||
|
||
## Installation | ||
|
||
```toml | ||
# Cargo.toml | ||
[dependencies] | ||
mz-http-proxy = { version = "0.1", features = ["hyper", "reqwest"] } | ||
``` | ||
|
||
[docs]: https://docs.rs/mz-http-proxy/0.1.0/ |
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
18 changes: 12 additions & 6 deletions
18
src/http-util/src/reqwest.rs → src/http-proxy/src/reqwest.rs
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.