#[non_exhaustive]pub struct BackendServiceCustomMetric {
pub dry_run: Option<bool>,
pub name: Option<String>,
/* private fields */
}Available on crate features
backend-services or region-backend-services only.Expand description
Custom Metrics are used for WEIGHTED_ROUND_ROBIN locality_lb_policy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dry_run: Option<bool>If true, the metric data is not used for load balancing.
name: Option<String>Name of a custom utilization signal. The name must be 1-64 characters
long and match the regular expression
[a-z]([-_.a-z0-9]*[a-z0-9])? which means that the
first character must be a lowercase letter, and all following
characters must be a dash, period, underscore, lowercase letter, or
digit, except the last character, which cannot be a dash, period, or
underscore. For usage guidelines, see Custom Metrics balancing mode. This
field can only be used for a global or regional backend service with the
loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED INTERNAL_SELF_MANAGED.
Implementations§
Source§impl BackendServiceCustomMetric
impl BackendServiceCustomMetric
pub fn new() -> Self
Sourcepub fn set_dry_run<T>(self, v: T) -> Self
pub fn set_dry_run<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_dry_run<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_dry_run<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for BackendServiceCustomMetric
impl Clone for BackendServiceCustomMetric
Source§fn clone(&self) -> BackendServiceCustomMetric
fn clone(&self) -> BackendServiceCustomMetric
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackendServiceCustomMetric
impl Debug for BackendServiceCustomMetric
Source§impl Default for BackendServiceCustomMetric
impl Default for BackendServiceCustomMetric
Source§fn default() -> BackendServiceCustomMetric
fn default() -> BackendServiceCustomMetric
Returns the “default value” for a type. Read more
Source§impl Message for BackendServiceCustomMetric
impl Message for BackendServiceCustomMetric
impl StructuralPartialEq for BackendServiceCustomMetric
Auto Trait Implementations§
impl Freeze for BackendServiceCustomMetric
impl RefUnwindSafe for BackendServiceCustomMetric
impl Send for BackendServiceCustomMetric
impl Sync for BackendServiceCustomMetric
impl Unpin for BackendServiceCustomMetric
impl UnwindSafe for BackendServiceCustomMetric
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
Mutably borrows from an owned value. Read more