pub struct FileClusterConfig {Show 17 fields
pub frontends: Vec<FileClusterFrontendConfig>,
pub backends: Vec<BackendConfig>,
pub protocol: FileClusterProtocolConfig,
pub sticky_session: Option<bool>,
pub https_redirect: Option<bool>,
pub send_proxy: Option<bool>,
pub load_balancing: LoadBalancingAlgorithms,
pub answer_503: Option<String>,
pub load_metric: Option<LoadMetric>,
pub http2: Option<bool>,
pub answers: Option<BTreeMap<String, String>>,
pub https_redirect_port: Option<u32>,
pub authorized_hashes: Option<Vec<String>>,
pub www_authenticate: Option<String>,
pub max_connections_per_ip: Option<u64>,
pub retry_after: Option<u32>,
pub health_check: Option<FileHealthCheckConfig>,
}Fields§
§frontends: Vec<FileClusterFrontendConfig>§backends: Vec<BackendConfig>§protocol: FileClusterProtocolConfig§sticky_session: Option<bool>§https_redirect: Option<bool>§send_proxy: Option<bool>§load_balancing: LoadBalancingAlgorithms§answer_503: Option<String>§load_metric: Option<LoadMetric>§http2: Option<bool>Backend-capability hint: true when the backend speaks HTTP/2 (h2c or h2+TLS once #1218 lands).
Does NOT gate H2 at the frontend — frontend H2 is ALPN-negotiated independently (see alpn_protocols).
answers: Option<BTreeMap<String, String>>Per-cluster HTTP answer template overrides keyed by HTTP status
code (e.g. "503"). Each value is either a filesystem path or an
inline:<body> literal — see resolve_answer_source. Loaded
into Cluster::answers at build time via load_answers.
Layering: an entry here overrides the listener-level
[listeners.<id>.answers] default for the matching status on
requests routed to this cluster. The listener-level map is the
global default; the cluster-level map is the per-cluster
override.
https_redirect_port: Option<u32>Optional explicit port to use when building the Location header
for an https_redirect. When unset, the listener’s effective HTTPS
port is used. Lets operators front a non-standard HTTPS port (e.g.
8443) on the redirect target while keeping https_redirect = true.
Authorized credentials for HTTP basic authentication, formatted as
username:hex(sha256(password)) (lower-case hex). Empty list
disables auth even when a frontend sets required_auth = true —
such requests are rejected with 401.
www_authenticate: Option<String>Realm string emitted in WWW-Authenticate: Basic realm="…" when
an unauthenticated request is rejected. Treated as an opaque
value (no template substitution).
max_connections_per_ip: Option<u64>Override the global per-(cluster, source-IP) connection limit for
this cluster. None (field absent) inherits the global default
max_connections_per_ip. Some(0) is explicit “unlimited for
this cluster”. Some(n > 0) overrides with the cluster-specific
limit. The source IP is taken from the parsed proxy-protocol
header when present, else peer_addr.
retry_after: Option<u32>Override the global Retry-After header value (seconds) emitted
on HTTP 429 responses for this cluster. None inherits the global
default. Some(0) omits the header. TCP clusters carry this
field for shape uniformity but never emit the header (no HTTP
envelope).
health_check: Option<FileHealthCheckConfig>Optional HTTP health-check configuration. The probe wire format
follows cluster.http2: HTTP/1.1 when false, HTTP/2 prior-knowledge
(h2c) when true.
Implementations§
Source§impl FileClusterConfig
impl FileClusterConfig
pub fn to_cluster_config( self, cluster_id: &str, expect_proxy: &HashSet<SocketAddr>, ) -> Result<ClusterConfig, ConfigError>
Trait Implementations§
Source§impl Clone for FileClusterConfig
impl Clone for FileClusterConfig
Source§fn clone(&self) -> FileClusterConfig
fn clone(&self) -> FileClusterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileClusterConfig
impl Debug for FileClusterConfig
Source§impl<'de> Deserialize<'de> for FileClusterConfig
impl<'de> Deserialize<'de> for FileClusterConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for FileClusterConfig
impl Hash for FileClusterConfig
Source§impl PartialEq for FileClusterConfig
impl PartialEq for FileClusterConfig
Source§fn eq(&self, other: &FileClusterConfig) -> bool
fn eq(&self, other: &FileClusterConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for FileClusterConfig
impl Serialize for FileClusterConfig
impl Eq for FileClusterConfig
impl StructuralPartialEq for FileClusterConfig
Auto Trait Implementations§
impl Freeze for FileClusterConfig
impl RefUnwindSafe for FileClusterConfig
impl Send for FileClusterConfig
impl Sync for FileClusterConfig
impl Unpin for FileClusterConfig
impl UnsafeUnpin for FileClusterConfig
impl UnwindSafe for FileClusterConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.