# parlov-probe
HTTP probe execution for parlov. Sends requests, captures the full response surface with timing.
## trait
```rust
pub trait Probe: Send + Sync {
fn execute(&self, def: &ProbeDefinition)
-> impl Future<Output = Result<ResponseSurface, Error>> + Send;
}
```
One call, one HTTP interaction, one `ResponseSurface`. The caller drives batching and sample collection.
## use it
```rust
use parlov_probe::http::HttpProbe;
use parlov_probe::Probe;
use parlov_core::ProbeDefinition;
use http::{Method, HeaderMap};
let client = HttpProbe::new();
let surface = client.execute(&ProbeDefinition {
url: "https://api.example.com/users/123".into(),
method: Method::GET,
headers: HeaderMap::new(),
body: None,
}).await?;
println!("status: {}", surface.status);
println!("timing: {}ms", surface.timing_ns / 1_000_000);
```
`HttpProbe` uses `reqwest` with connection pooling. Timing is measured via `std::time::Instant` around the request-to-response path. All headers from `ProbeDefinition` are forwarded — auth context is expressed as a plain `Authorization` header.
## custom probes
Implement `Probe` for custom execution strategies (e.g. HTTP/2 single-packet timing, mTLS client certs):
```rust
struct MyProbe { /* ... */ }
impl Probe for MyProbe {
fn execute(&self, def: &ProbeDefinition)
-> impl Future<Output = Result<ResponseSurface, Error>> + Send
{
async { todo!() }
}
}
```
## license
MIT OR Apache-2.0