relay-core-http 0.1.1

REST/SSE HTTP API adapter for relay-core: language-agnostic integration boundary for external tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use axum::{routing::get, Json, Router};
use serde_json::{json, Value};

/// GET /api/v1/version
pub fn router() -> Router {
    Router::new().route("/api/v1/version", get(handler))
}

async fn handler() -> Json<Value> {
    Json(json!({
        "engine_version": env!("CARGO_PKG_VERSION"),
        "api_version": "1",
        "capabilities": ["flows", "rules", "intercepts", "mock", "metrics", "status", "events"]
    }))
}