Can apply wasm to merged events, also for binned queries

This commit is contained in:
Dominik Werder
2023-08-22 15:56:10 +02:00
parent 9aec274899
commit b8a8ecd537
13 changed files with 364 additions and 63 deletions

View File

@@ -12,10 +12,11 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
humantime-serde = "1.1.1"
async-channel = "1.8.0"
bytes = "1.3"
bytes = "1.4.0"
chrono = { version = "0.4.19", features = ["serde"] }
futures-util = "0.3.14"
tracing = "0.1.37"
url = "2.2"
num-traits = "0.2"
num-traits = "0.2.16"
hex = "0.4.3"
err = { path = "../err" }

10
crates/netpod/src/hex.rs Normal file
View File

@@ -0,0 +1,10 @@
/// Input may also contain whitespace.
pub fn decode_hex<INP: AsRef<str>>(inp: INP) -> Result<Vec<u8>, ()> {
let a: Vec<_> = inp
.as_ref()
.bytes()
.filter(|&x| (x >= b'0' && x <= b'9') || (x >= b'a' && x <= b'f'))
.collect();
let ret = hex::decode(a).map_err(|_| ())?;
Ok(ret)
}

View File

@@ -1,3 +1,4 @@
pub mod hex;
pub mod histo;
pub mod query;
pub mod range;