feat(gateway): the 5 core gateway routes wired into the router

- src/gateway/routes.rs: /search /schema /call /batch /subscribe
- SSE projection: data frames per event, error event terminates,
  internal/unknown ops -> NOT_FOUND, query-op -> INVALID_OPERATION_TYPE
- /search + /schema ACL-filtered via services/list + services/schema
  discovery handlers; /batch ordered per-item envelope JSON
- gateway_router() merged into HttpAdapter's router under the shared
  bearer-auth route layer; decoy remains the fallback
- adapted to alkcall 0.1.1: OperationType::Sub, envelope error by value

Verified: cargo test (71 lib tests), clippy -D warnings, fmt.
This commit is contained in:
2026-08-28 08:31:43 +00:00
parent d070e548ad
commit ea5ac83b57
4 changed files with 1196 additions and 7 deletions
+2
View File
@@ -1,4 +1,6 @@
pub mod dispatch;
pub mod error;
pub mod routes;
pub use dispatch::GatewayDispatch;
pub use routes::CallRequest;
File diff suppressed because it is too large Load Diff
+1
View File
@@ -133,6 +133,7 @@ fn build_router(state: RouterState, extra_routes: Option<Router>) -> Router {
let auth_state = Arc::clone(&state.identity_provider);
let default: Router<RouterState> = Router::new()
.merge(crate::gateway::routes::gateway_router())
.route("/healthz", get(healthz))
.route_layer(from_fn_with_state(
auth_state.clone(),