Expand description
Config-driven proxy application.
When rws.config.toml contains [[route]] or [[upstream]] sections,
ConfigDrivenApp is used as the top-level Application instead of the
hardcoded build_app() in main.rs.
§Quick start
# rws.config.toml
[[upstream]]
name = "api"
backends = ["localhost:3000"]
[[route]]
name = "api-proxy"
[route.match]
path = "/api/*"
[route.action]
type = "proxy"
[route.action.proxy]
upstream = "api"Modules§
- builder
- Builder: converts a
ProxyConfiginto a liveConfigDrivenAppwith health checkers and L4/WS proxy threads. - health
- Background health-checker for upstream backends.
- parser
- Hand-rolled TOML parser that extracts
[[upstream]],[[route]],[[tcp_proxy]],[[udp_proxy]],[[ws_proxy]]sections fromrws.config.tomlinto a flatSectionMap.
Structs§
- Cache
Config - Config
Driven App - An
Applicationthat routes requests based on a parsedProxyConfig. - Health
Check Config - Match
Config - Middleware
Config - Proxy
Config - Rate
Limit Config - Rewrite
Rule Config - Route
Config - TcpProxy
Config - UdpProxy
Config - Upstream
Config - WsProxy
Config
Enums§
Functions§
- build_
from_ file - Build a
ConfigDrivenAppfromrws.config.tomland spawn L4/WS proxy threads. Returns the app and a list of thread handles.