Skip to content

Commit

Permalink
Add 'push-no-tls' feature, for push support when HTTPS is unnecessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonY committed Sep 20, 2022
1 parent fc591fd commit 5b5a9f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ default = ["protobuf"]
gen = ["protobuf-codegen-pure"]
nightly = ["libc"]
process = ["libc", "procfs"]
push = ["reqwest", "libc", "protobuf"]
push = ["push-reqwest-ssl", "push-deps"]
push-no-tls = ["push-deps"]
push-reqwest-ssl = ["reqwest?/default-tls"]
push-deps = ["reqwest", "libc", "protobuf"]

[dependencies]
cfg-if = "^1.0"
Expand All @@ -32,7 +35,7 @@ libc = { version = "^0.2", optional = true }
parking_lot = "^0.12"
protobuf = { version = "^2.0", optional = true }
memchr = "^2.3"
reqwest = { version = "^0.11", features = ["blocking"], optional = true }
reqwest = { version = "^0.11", default-features = false, features = ["blocking"], optional = true }
thiserror = "^1.0"

[target.'cfg(target_os = "linux")'.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ mod errors;
mod gauge;
mod histogram;
mod metrics;
#[cfg(feature = "push")]
#[cfg(feature = "push-deps")]
mod push;
mod registry;
mod value;
Expand Down Expand Up @@ -219,7 +219,7 @@ pub use self::histogram::DEFAULT_BUCKETS;
pub use self::histogram::{exponential_buckets, linear_buckets};
pub use self::histogram::{Histogram, HistogramOpts, HistogramTimer, HistogramVec};
pub use self::metrics::Opts;
#[cfg(feature = "push")]
#[cfg(feature = "push-deps")]
pub use self::push::{
hostname_grouping_key, push_add_collector, push_add_metrics, push_collector, push_metrics,
BasicAuthentication,
Expand Down

0 comments on commit 5b5a9f2

Please sign in to comment.