tracing_console_host/lib.rs
1//! protosocket-rpc host that streams closed spans from a `tracing-cache::SpanCache`
2//! to console clients over messagepack.
3//!
4//! Usage:
5//! ```ignore
6//! let (cache, driver) = tracing_cache::SpanCache::new(16384);
7//! let cache = std::sync::Arc::new(cache);
8//! tokio::spawn(driver.run());
9//! tracing_console_host::serve(cache, "127.0.0.1:7777".parse()?).await?;
10//! ```
11
12#![cfg_attr(
13 test,
14 allow(clippy::unwrap_used, clippy::expect_used, clippy::panic_in_result_fn,)
15)]
16
17mod protocol;
18mod server;
19mod wire;
20
21pub use protocol::{
22 Request, RequestBody, Response, ResponseBody, WireEvent, WireFieldValue, WireLevel,
23 WireLevelFilter, WireServerInfo, WireSpan,
24};
25pub use server::{ServeError, serve};