Enum google_api_proto::google::cloud::compute::v1::backend_service::SessionAffinity
source · #[repr(i32)]pub enum SessionAffinity {
UndefinedSessionAffinity = 0,
ClientIp = 345_665_051,
ClientIpNoDestination = 106_122_516,
ClientIpPortProto = 221_722_926,
ClientIpProto = 25_322_148,
GeneratedCookie = 370_321_204,
HeaderField = 200_737_960,
HttpCookie = 494_981_627,
None = 2_402_104,
}
Expand description
Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are 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. For more details, see: Session Affinity.
Variants§
UndefinedSessionAffinity = 0
A value indicating that the enum field is not set.
ClientIp = 345_665_051
2-tuple hash on packet’s source and destination IP addresses. Connections from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy.
ClientIpNoDestination = 106_122_516
1-tuple hash only on packet’s source IP address. Connections from the same source IP address will be served by the same backend VM while that VM remains healthy. This option can only be used for Internal TCP/UDP Load Balancing.
ClientIpPortProto = 221_722_926
5-tuple hash on packet’s source and destination IP addresses, IP protocol, and source and destination ports. Connections for the same IP protocol from the same source IP address and port to the same destination IP address and port will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
ClientIpProto = 25_322_148
3-tuple hash on packet’s source and destination IP addresses, and IP protocol. Connections for the same IP protocol from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
GeneratedCookie = 370_321_204
Hash based on a cookie generated by the L7 loadbalancer. Only valid for HTTP(S) load balancing.
HeaderField = 200_737_960
The hash is based on a user specified header field.
HttpCookie = 494_981_627
The hash is based on a user provided cookie.
None = 2_402_104
No session affinity. Connections from the same client IP may go to any instance in the pool.
Implementations§
source§impl SessionAffinity
impl SessionAffinity
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for SessionAffinity
impl Clone for SessionAffinity
source§fn clone(&self) -> SessionAffinity
fn clone(&self) -> SessionAffinity
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SessionAffinity
impl Debug for SessionAffinity
source§impl Default for SessionAffinity
impl Default for SessionAffinity
source§fn default() -> SessionAffinity
fn default() -> SessionAffinity
source§impl From<SessionAffinity> for i32
impl From<SessionAffinity> for i32
source§fn from(value: SessionAffinity) -> i32
fn from(value: SessionAffinity) -> i32
source§impl Hash for SessionAffinity
impl Hash for SessionAffinity
source§impl Ord for SessionAffinity
impl Ord for SessionAffinity
source§fn cmp(&self, other: &SessionAffinity) -> Ordering
fn cmp(&self, other: &SessionAffinity) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for SessionAffinity
impl PartialEq for SessionAffinity
source§fn eq(&self, other: &SessionAffinity) -> bool
fn eq(&self, other: &SessionAffinity) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SessionAffinity
impl PartialOrd for SessionAffinity
source§fn partial_cmp(&self, other: &SessionAffinity) -> Option<Ordering>
fn partial_cmp(&self, other: &SessionAffinity) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for SessionAffinity
impl TryFrom<i32> for SessionAffinity
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<SessionAffinity, UnknownEnumValue>
fn try_from(value: i32) -> Result<SessionAffinity, UnknownEnumValue>
impl Copy for SessionAffinity
impl Eq for SessionAffinity
impl StructuralPartialEq for SessionAffinity
Auto Trait Implementations§
impl Freeze for SessionAffinity
impl RefUnwindSafe for SessionAffinity
impl Send for SessionAffinity
impl Sync for SessionAffinity
impl Unpin for SessionAffinity
impl UnwindSafe for SessionAffinity
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<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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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