Struct sozu_command_lib::proto::command::Cluster
source · pub struct Cluster {
pub cluster_id: String,
pub sticky_session: bool,
pub https_redirect: bool,
pub proxy_protocol: Option<i32>,
pub load_balancing: i32,
pub answer_503: Option<String>,
pub load_metric: Option<i32>,
}
Expand description
A cluster is what binds a frontend to backends with routing rules
Fields§
§cluster_id: String
§sticky_session: bool
wether a connection from a client shall be always redirected to the same backend
https_redirect: bool
§proxy_protocol: Option<i32>
§load_balancing: i32
§answer_503: Option<String>
§load_metric: Option<i32>
Implementations§
source§impl Cluster
impl Cluster
sourcepub fn proxy_protocol(&self) -> ProxyProtocolConfig
pub fn proxy_protocol(&self) -> ProxyProtocolConfig
Returns the enum value of proxy_protocol
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_proxy_protocol(&mut self, value: ProxyProtocolConfig)
pub fn set_proxy_protocol(&mut self, value: ProxyProtocolConfig)
Sets proxy_protocol
to the provided enum value.
sourcepub fn load_balancing(&self) -> LoadBalancingAlgorithms
pub fn load_balancing(&self) -> LoadBalancingAlgorithms
Returns the enum value of load_balancing
, or the default if the field is set to an invalid enum value.
sourcepub fn set_load_balancing(&mut self, value: LoadBalancingAlgorithms)
pub fn set_load_balancing(&mut self, value: LoadBalancingAlgorithms)
Sets load_balancing
to the provided enum value.
sourcepub fn answer_503(&self) -> &str
pub fn answer_503(&self) -> &str
Returns the value of answer_503
, or the default value if answer_503
is unset.
sourcepub fn load_metric(&self) -> LoadMetric
pub fn load_metric(&self) -> LoadMetric
Returns the enum value of load_metric
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_load_metric(&mut self, value: LoadMetric)
pub fn set_load_metric(&mut self, value: LoadMetric)
Sets load_metric
to the provided enum value.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Cluster
impl<'de> Deserialize<'de> for Cluster
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Message for Cluster
impl Message for Cluster
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl Ord for Cluster
impl Ord for Cluster
source§impl PartialEq for Cluster
impl PartialEq for Cluster
source§impl PartialOrd for Cluster
impl PartialOrd for Cluster
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Cluster
impl StructuralPartialEq for Cluster
Auto Trait Implementations§
impl Freeze for Cluster
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnwindSafe for Cluster
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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
Compare self to
key
and return true
if they are equal.