Move binding/http mod into its own file

Signed-off-by: Jim Crossley <jim@crossleys.org>
This commit is contained in:
Jim Crossley 2021-07-29 17:41:33 -04:00
parent 96c69d99da
commit ca3ba3b88c
2 changed files with 7 additions and 8 deletions

5
src/binding/http/mod.rs Normal file
View File

@ -0,0 +1,5 @@
pub static SPEC_VERSION_HEADER: &str = "ce-specversion";
pub fn header_prefix(name: &str) -> String {
super::header_prefix("ce-", name)
}

View File

@ -2,6 +2,8 @@
#[cfg(feature = "actix")]
pub mod actix;
#[cfg(any(feature = "actix", feature = "warp", feature = "reqwest"))]
pub mod http;
#[cfg(feature = "rdkafka")]
pub mod rdkafka;
#[cfg(feature = "reqwest")]
@ -17,14 +19,6 @@ pub(crate) mod kafka {
}
}
#[cfg(any(feature = "actix", feature = "warp", feature = "reqwest"))]
pub(crate) mod http {
pub static SPEC_VERSION_HEADER: &str = "ce-specversion";
pub fn header_prefix(name: &str) -> String {
super::header_prefix("ce-", name)
}
}
#[cfg(any(feature = "actix", feature = "warp"))]
#[macro_export]
macro_rules! str_to_header_value {