very fast at protocol indexer with flexible filtering, xrpc queries, cursor-backed event stream, and more, built on fjall
rust fjall at-protocol atproto indexer
at main 9 lines 373 B view raw
1use crate::control::Hydrant; 2use axum::{Json, extract::State, http::StatusCode, response::IntoResponse, response::Response}; 3 4pub async fn get_stats(State(hydrant): State<Hydrant>) -> Response { 5 match hydrant.stats().await { 6 Ok(stats) => Json(stats).into_response(), 7 Err(e) => (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()).into_response(), 8 } 9}