pub struct UpstreamConfig {
pub name: String,
pub backends: Vec<String>,
pub strategy: String,
pub health_check: Option<HealthCheckConfig>,
pub tls: bool,
pub tls_ca_file: Option<String>,
pub tls_client_cert_file: Option<String>,
pub tls_client_key_file: Option<String>,
pub weights: Vec<u32>,
pub sticky: Option<StickyConfig>,
pub circuit_breaker: Option<BreakerConfig>,
pub retry: Option<RetryConfig>,
}Fields§
§name: String§backends: Vec<String>§strategy: String§health_check: Option<HealthCheckConfig>§tls: booltrue when all backends use https:// scheme — connections to the
upstream are made over TLS. Requires the http-client or http2
feature (which bring in rustls + webpki-roots).
tls_ca_file: Option<String>tls_ca_file — PEM file of CA certificates to trust for this
upstream’s https:// backends instead of the public WebPKI roots
(a private CA or a self-signed certificate). None = WebPKI.
tls_client_cert_file: Option<String>tls_client_cert_file / tls_client_key_file — a client certificate
(PEM chain and key) presented to TLS backends that require one.
Since 18.3.0.
tls_client_key_file: Option<String>§weights: Vec<u32>weights — one per backend, in order (default 1 each). Since 18.6.0.
sticky: Option<StickyConfig>[upstream.sticky] — keep a client on one backend. Since 18.6.0.
circuit_breaker: Option<BreakerConfig>[upstream.circuit_breaker] — take failing backends out of rotation
(passive health checks). Since 18.6.0.
retry: Option<RetryConfig>[upstream.retry] — try another backend. Since 18.6.0.