How indikamadhushan/http_router_in_go works
This is a small YAML-configured HTTP reverse-proxy gateway, accompanied by a standalone mock HTTP backend. The main workflow is a client request entering the gateway, which reads api.yaml at startup, registers method/path routes, and forwards matching requests to their configured upstreams. The mock backend independently serves a JSON response. The README is empty, and api.yaml was not excerpted, so the gateway’s configured upstreams and any connection to the mock backend cannot be confirmed.
Main entry points: main.go Route and proxy server · api.yaml API configuration · mock-backend/main.go JSON HTTP service
Components 5
Gateway
- Route and proxy server
main.go - API configuration
api.yaml
Mock backend
- JSON HTTP service
cmd/mock-backend/main.go
Other components
- HTTP client
- Configured upstream
Connections 4
- HTTP client → Route and proxy server: sends requests
main.go - Route and proxy server → API configuration: reads at startup
main.go - Route and proxy server → Configured upstream: proxies requests
main.go - HTTP client → JSON HTTP service: sends requests
cmd/mock-backend/main.go