pub struct UdpClusterConfig {
pub affinity_key: Option<i32>,
pub responses: Option<u32>,
pub requests: Option<u32>,
pub send_proxy_protocol: Option<bool>,
pub proxy_protocol_every_datagram: Option<bool>,
pub health: Option<UdpHealthConfig>,
}Expand description
UDP-specific cluster knobs. Attached to a Cluster via the udp field.
Fields§
§affinity_key: Option<i32>flow affinity key; defaults to SOURCE_IP
responses: Option<u32>expected replies per flow; 0 = unlimited
requests: Option<u32>max client datagrams per flow; 0 = unlimited
send_proxy_protocol: Option<bool>send a PROXY protocol v2 header to the backend
proxy_protocol_every_datagram: Option<bool>prepend PPv2 to every datagram; false = first-datagram only
health: Option<UdpHealthConfig>optional backend health-check configuration
Implementations§
Source§impl UdpClusterConfig
impl UdpClusterConfig
Sourcepub fn affinity_key(&self) -> UdpAffinityKey
pub fn affinity_key(&self) -> UdpAffinityKey
Returns the enum value of affinity_key, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_affinity_key(&mut self, value: UdpAffinityKey)
pub fn set_affinity_key(&mut self, value: UdpAffinityKey)
Sets affinity_key to the provided enum value.
Sourcepub fn responses(&self) -> u32
pub fn responses(&self) -> u32
Returns the value of responses, or the default value if responses is unset.
Sourcepub fn requests(&self) -> u32
pub fn requests(&self) -> u32
Returns the value of requests, or the default value if requests is unset.
Sourcepub fn send_proxy_protocol(&self) -> bool
pub fn send_proxy_protocol(&self) -> bool
Returns the value of send_proxy_protocol, or the default value if send_proxy_protocol is unset.
Sourcepub fn proxy_protocol_every_datagram(&self) -> bool
pub fn proxy_protocol_every_datagram(&self) -> bool
Returns the value of proxy_protocol_every_datagram, or the default value if proxy_protocol_every_datagram is unset.
Trait Implementations§
Source§impl Clone for UdpClusterConfig
impl Clone for UdpClusterConfig
Source§fn clone(&self) -> UdpClusterConfig
fn clone(&self) -> UdpClusterConfig
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 UdpClusterConfig
impl Debug for UdpClusterConfig
Source§impl Default for UdpClusterConfig
impl Default for UdpClusterConfig
Source§impl<'de> Deserialize<'de> for UdpClusterConfig
impl<'de> Deserialize<'de> for UdpClusterConfig
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>,
impl Eq for UdpClusterConfig
Source§impl Hash for UdpClusterConfig
impl Hash for UdpClusterConfig
Source§impl Message for UdpClusterConfig
impl Message for UdpClusterConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl Ord for UdpClusterConfig
impl Ord for UdpClusterConfig
Source§fn cmp(&self, other: &UdpClusterConfig) -> Ordering
fn cmp(&self, other: &UdpClusterConfig) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for UdpClusterConfig
impl PartialEq for UdpClusterConfig
Source§fn eq(&self, other: &UdpClusterConfig) -> bool
fn eq(&self, other: &UdpClusterConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for UdpClusterConfig
impl PartialOrd for UdpClusterConfig
Source§impl Serialize for UdpClusterConfig
impl Serialize for UdpClusterConfig
impl StructuralPartialEq for UdpClusterConfig
Auto Trait Implementations§
impl Freeze for UdpClusterConfig
impl RefUnwindSafe for UdpClusterConfig
impl Send for UdpClusterConfig
impl Sync for UdpClusterConfig
impl Unpin for UdpClusterConfig
impl UnsafeUnpin for UdpClusterConfig
impl UnwindSafe for UdpClusterConfig
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.