Skip to main content

serve_file

Function serve_file 

Source
pub async fn serve_file(path: PathBuf, config: TraceViewerConfig) -> Result<()>
Expand description

Start the trace viewer server with a file-backed event source.

The file is re-read on each request, allowing live updates as the file grows.

ยงExample

agent_client_protocol_trace_viewer::serve_file(PathBuf::from("trace.jsons"), Default::default()).await?;