Expand description
§A3S Gateway
An AI-native API gateway that combines Traefik-style reverse proxy capabilities with AI agent routing and orchestration for the A3S ecosystem.
§Architecture
Entrypoint → Router → Middleware Pipeline → Service (Load Balancer) → Backend§Core Features
- Multi-protocol: HTTP/HTTPS, WebSocket, SSE/Streaming, TCP
- Dynamic Routing: Traefik-style rule engine (
Host(),PathPrefix(),Headers()) - Load Balancing: Round-robin, weighted, least-connections
- Middleware Pipeline: Auth, rate-limit, CORS, headers, strip-prefix
- Health Checks: Active HTTP probes with automatic backend removal
- Hot Reload: File-watch based configuration reload without restart
§Quick Start
ⓘ
use a3s_gateway::{Gateway, config::GatewayConfig};
#[tokio::main]
async fn main() -> a3s_gateway::Result<()> {
let config = GatewayConfig::from_file("gateway.hcl").await?;
let gateway = Gateway::new(config).await?;
gateway.run().await?;
Ok(())
}Re-exports§
pub use error::GatewayError;pub use error::Result;pub use gateway::Gateway;pub use provider::discovery::DiscoveredService;pub use provider::discovery::DiscoveryProvider;pub use provider::discovery::ServiceMetadata;
Modules§
- config
- Configuration types for A3S Gateway
- dashboard
- Dashboard API — serves gateway status, metrics, and management endpoints
- error
- Centralized error types for A3S Gateway
- gateway
- Gateway orchestrator — high-level coordinator for all gateway components
- provider
- Configuration providers — dynamic config loading and hot reload
Structs§
- Health
Status - Gateway health status snapshot
Enums§
- Gateway
State - Gateway runtime state