pub struct ClusterConfig {
pub cluster: ClusterId,
pub affinity_with_port: bool,
pub responses: u32,
pub requests: u32,
pub front_timeout: Duration,
pub back_timeout: Duration,
pub send_proxy_protocol: bool,
pub proxy_protocol_every_datagram: bool,
pub max_flows_per_ip: u64,
pub max_flows_per_subnet: u64,
pub subnet_ipv4_prefix: u32,
pub subnet_ipv6_prefix: u32,
}Expand description
Per-cluster knobs the shell binds to a listener’s flows. Mirrors the
UdpClusterConfig proto but stays in pure-core terms. Defaults match the
proto defaults.
Fields§
§cluster: ClusterIdCluster the listener routes to.
affinity_with_port: boolHash src_ip + src_port (true) vs src_ip only (false) into the
backend-selection affinity key. Maps the UdpAffinityKey proto enum.
Flows are always keyed on the full source address (FlowKey).
responses: u32Expected replies per flow before close. 0 = unlimited (DNS = 1).
requests: u32Max client datagrams per flow before close. 0 = unlimited.
front_timeout: DurationIdle timeout (client direction). Resets on every datagram.
back_timeout: DurationIdle timeout (upstream direction). Resets on every reply.
send_proxy_protocol: boolPrepend a PPv2 DGRAM header to upstream datagrams.
proxy_protocol_every_datagram: boolPPv2 on every datagram (true) vs first-datagram-only (false, default).
max_flows_per_ip: u64Concurrent flows one source IP may hold on this cluster, per listener.
0 = unlimited. Resolved by the shell from the cluster’s own
max_connections_per_ip; the global default is not inherited, so an
absent value is unlimited.
max_flows_per_subnet: u64Concurrent flows one source subnet may hold on this cluster, per
listener. 0 = unlimited. Resolved from max_connections_per_subnet
the same way; the subnet is the source IP masked to the two prefixes
below.
subnet_ipv4_prefix: u32IPv4 prefix length, in bits, of a subnet for max_flows_per_subnet.
subnet_ipv6_prefix: u32IPv6 prefix length, in bits, of a subnet for max_flows_per_subnet.
Trait Implementations§
Source§impl Clone for ClusterConfig
impl Clone for ClusterConfig
Source§impl Debug for ClusterConfig
impl Debug for ClusterConfig
Source§impl Default for ClusterConfig
impl Default for ClusterConfig
impl Eq for ClusterConfig
Source§impl PartialEq for ClusterConfig
impl PartialEq for ClusterConfig
impl StructuralPartialEq for ClusterConfig
Auto Trait Implementations§
impl Freeze for ClusterConfig
impl RefUnwindSafe for ClusterConfig
impl Send for ClusterConfig
impl Sync for ClusterConfig
impl Unpin for ClusterConfig
impl UnsafeUnpin for ClusterConfig
impl UnwindSafe for ClusterConfig
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.