Skip to content

Commit 60183fd

Browse files
committed
Add 'push-no-tls' feature, for push support when HTTPS is unnecessary.
Signed-off-by: Brandon Yarbrough <[email protected]>
1 parent fc591fd commit 60183fd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ default = ["protobuf"]
2222
gen = ["protobuf-codegen-pure"]
2323
nightly = ["libc"]
2424
process = ["libc", "procfs"]
25-
push = ["reqwest", "libc", "protobuf"]
25+
push = ["push-reqwest-ssl", "push-deps"]
26+
push-no-tls = ["push-deps"]
27+
push-reqwest-ssl = ["reqwest?/default-tls"]
28+
push-deps = ["reqwest", "libc", "protobuf"]
2629

2730
[dependencies]
2831
cfg-if = "^1.0"
@@ -32,7 +35,7 @@ libc = { version = "^0.2", optional = true }
3235
parking_lot = "^0.12"
3336
protobuf = { version = "^2.0", optional = true }
3437
memchr = "^2.3"
35-
reqwest = { version = "^0.11", features = ["blocking"], optional = true }
38+
reqwest = { version = "^0.11", default-features = false, features = ["blocking"], optional = true }
3639
thiserror = "^1.0"
3740

3841
[target.'cfg(target_os = "linux")'.dependencies]

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ mod errors;
158158
mod gauge;
159159
mod histogram;
160160
mod metrics;
161-
#[cfg(feature = "push")]
161+
#[cfg(feature = "push-deps")]
162162
mod push;
163163
mod registry;
164164
mod value;
@@ -219,7 +219,7 @@ pub use self::histogram::DEFAULT_BUCKETS;
219219
pub use self::histogram::{exponential_buckets, linear_buckets};
220220
pub use self::histogram::{Histogram, HistogramOpts, HistogramTimer, HistogramVec};
221221
pub use self::metrics::Opts;
222-
#[cfg(feature = "push")]
222+
#[cfg(feature = "push-deps")]
223223
pub use self::push::{
224224
hostname_grouping_key, push_add_collector, push_add_metrics, push_collector, push_metrics,
225225
BasicAuthentication,

0 commit comments

Comments
 (0)