Struct google_api_proto::google::cloud::compute::v1::ConsistentHashLoadBalancerSettings
source · pub struct ConsistentHashLoadBalancerSettings {
pub http_cookie: Option<ConsistentHashLoadBalancerSettingsHttpCookie>,
pub http_header_name: Option<String>,
pub minimum_ring_size: Option<i64>,
}
Expand description
This message defines settings for a consistent hash style load balancer.
Fields§
Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
http_header_name: Option<String>
The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
minimum_ring_size: Option<i64>
The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
Implementations§
source§impl ConsistentHashLoadBalancerSettings
impl ConsistentHashLoadBalancerSettings
sourcepub fn minimum_ring_size(&self) -> i64
pub fn minimum_ring_size(&self) -> i64
Returns the value of minimum_ring_size
, or the default value if minimum_ring_size
is unset.
sourcepub fn http_header_name(&self) -> &str
pub fn http_header_name(&self) -> &str
Returns the value of http_header_name
, or the default value if http_header_name
is unset.
Trait Implementations§
source§impl Clone for ConsistentHashLoadBalancerSettings
impl Clone for ConsistentHashLoadBalancerSettings
source§fn clone(&self) -> ConsistentHashLoadBalancerSettings
fn clone(&self) -> ConsistentHashLoadBalancerSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Message for ConsistentHashLoadBalancerSettings
impl Message for ConsistentHashLoadBalancerSettings
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 PartialEq for ConsistentHashLoadBalancerSettings
impl PartialEq for ConsistentHashLoadBalancerSettings
source§fn eq(&self, other: &ConsistentHashLoadBalancerSettings) -> bool
fn eq(&self, other: &ConsistentHashLoadBalancerSettings) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ConsistentHashLoadBalancerSettings
Auto Trait Implementations§
impl Freeze for ConsistentHashLoadBalancerSettings
impl RefUnwindSafe for ConsistentHashLoadBalancerSettings
impl Send for ConsistentHashLoadBalancerSettings
impl Sync for ConsistentHashLoadBalancerSettings
impl Unpin for ConsistentHashLoadBalancerSettings
impl UnwindSafe for ConsistentHashLoadBalancerSettings
Blanket Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request