Skip to main content

Module config

Module config 

Source
Expand description

Configuration types and loaders for the proxy.

Supports both file-based (TOML) and database-backed configuration.

There is no hot reload. A ConfigReloader used to sit here with a channel nobody read, and POST /config/reload answered “Configuration reload requested” without reloading anything. Both are gone rather than left to be believed; changing the configuration needs a restart.

Structs§

AcmeConfig
ACME configuration for automatic certificate management.
Backend
A backend server.
HealthCheckConfig
Health check configuration.
ProxyConfig
Main proxy configuration.
RateLimitDefaults
Default rate limiting settings.
Route
A proxy route configuration.
RouteMatch
Route matching criteria.
RouteRateLimit
Per-route rate limiting.
ServerConfig
Server configuration.
TlsConfig
TLS configuration.
Upstream
An upstream (group of backend servers).

Enums§

LoadBalanceStrategy
Load balancing strategy.
PathMatchType
Path matching type.
RateLimitKey
Rate limit key type.
UpstreamHttpVersion
Which HTTP version to speak to an upstream.

Functions§

delete_route
Delete a route. Returns whether a row was removed.
delete_upstream
Delete an upstream and, by cascade, its backends. Returns whether a row was removed.
load_from_database
Load the whole proxy configuration: every route and every upstream.
load_from_file
Load proxy configuration from a TOML file.
load_routes
Load every route, highest priority first.
load_upstreams
Load every upstream, each with its backends.
path_has_prefix
Whether path is prefix or lies beneath it, on a segment boundary.
save_route
Insert a route, or replace it if one with the same id is already stored.
save_upstream
Insert an upstream and its backends, or replace them if the id is stored.