Copied from api_gateway, removed REST handlers (port 8080), added tonic-web + CORS for grpc-web browser access. Binary renamed: api-gateway → api Changes: - Package name: api-gateway → api - Deleted src/handlers/ (REST ML endpoints on port 8080) - Added tonic-web 0.13 + tower-http CORS layer - Server::builder().accept_http1(true) for grpc-web - CORS_ORIGINS env var (default http://localhost:5173) - Metrics server on port 9091 (axum) preserved - All 95 lib tests pass, 0 clippy warnings - Added services/api to workspace members Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
291 B
Rust
13 lines
291 B
Rust
//! gRPC routing module for API Gateway
|
|
//!
|
|
//! Provides:
|
|
//! - Request routing to backend services
|
|
//! - Service discovery
|
|
//! - Load balancing
|
|
//! - Circuit breaking
|
|
//! - Token bucket rate limiting
|
|
|
|
pub mod rate_limiter;
|
|
|
|
pub use rate_limiter::{CacheStats, RateLimitConfig, RateLimiter};
|