#[non_exhaustive]pub struct BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity {
pub spillover: Option<Spillover>,
pub spillover_ratio: Option<f32>,
/* private fields */
}backend-services or region-backend-services only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.spillover: Option<Spillover>This field indicates whether zonal affinity is enabled or not. The possible values are:
- ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity is disabled. The load balancer distributes new connections to all healthy backend endpoints across all zones.
- ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is enabled. The load balancer distributes new connections to all healthy backend endpoints in the local zone only. If there are no healthy backend endpoints in the local zone, the load balancer distributes new connections to all backend endpoints in the local zone.
- ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is enabled. The load balancer distributes new connections to all healthy backend endpoints in the local zone only. If there aren’t enough healthy backend endpoints in the local zone, the load balancer distributes new connections to all healthy backend endpoints across all zones.
spillover_ratio: Option<f32>The value of the field must be in [0, 1]. When the ratio of the count of healthy backend endpoints in a zone to the count of backend endpoints in that same zone is equal to or above this threshold, the load balancer distributes new connections to all healthy endpoints in the local zone only. When the ratio of the count of healthy backend endpoints in a zone to the count of backend endpoints in that same zone is below this threshold, the load balancer distributes all new connections to all healthy endpoints across all zones.
Implementations§
Source§impl BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
pub fn new() -> Self
Sourcepub fn set_spillover<T>(self, v: T) -> Self
pub fn set_spillover<T>(self, v: T) -> Self
Sets the value of spillover.
§Example
use google_cloud_compute_v1::model::backend_service_network_pass_through_lb_traffic_policy_zonal_affinity::Spillover;
let x0 = BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity::new().set_spillover(Spillover::ZonalAffinitySpillCrossZone);
let x1 = BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity::new().set_spillover(Spillover::ZonalAffinityStayWithinZone);Sourcepub fn set_or_clear_spillover<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_spillover<T>(self, v: Option<T>) -> Self
Sets or clears the value of spillover.
§Example
use google_cloud_compute_v1::model::backend_service_network_pass_through_lb_traffic_policy_zonal_affinity::Spillover;
let x0 = BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity::new().set_or_clear_spillover(Some(Spillover::ZonalAffinitySpillCrossZone));
let x1 = BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity::new().set_or_clear_spillover(Some(Spillover::ZonalAffinityStayWithinZone));
let x_none = BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity::new().set_or_clear_spillover(None::<Spillover>);Sourcepub fn set_spillover_ratio<T>(self, v: T) -> Self
pub fn set_spillover_ratio<T>(self, v: T) -> Self
Sets the value of spillover_ratio.
§Example
let x = BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity::new().set_spillover_ratio(42.0);Sourcepub fn set_or_clear_spillover_ratio<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_spillover_ratio<T>(self, v: Option<T>) -> Self
Sets or clears the value of spillover_ratio.
§Example
let x = BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity::new().set_or_clear_spillover_ratio(Some(42.0));
let x = BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity::new().set_or_clear_spillover_ratio(None::<f32>);Trait Implementations§
Source§impl Clone for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl Clone for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
Source§fn clone(&self) -> BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
fn clone(&self) -> BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl Default for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
Source§fn default() -> BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
fn default() -> BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
Source§impl PartialEq for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl PartialEq for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
Source§fn eq(
&self,
other: &BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity,
) -> bool
fn eq( &self, other: &BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity, ) -> bool
self and other values to be equal, and is used by ==.