#[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
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 (const: unstable) · 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
impl StructuralPartialEq for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
Auto Trait Implementations§
impl Freeze for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl RefUnwindSafe for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl Send for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl Sync for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl Unpin for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl UnsafeUnpin for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
impl UnwindSafe for BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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